2,377 questions
4
votes
1
answer
583
views
What is the difference between withLocale() and localizedBy() in Java DateTimeFormatter?
DateTimeFormatter
Java 8 introduced a modern date and time API with new types like LocalDate available in java.time.* package. It also provided a new DateTimeFormatter class for formatting (generating ...
-2
votes
2
answers
230
views
Change date format DatePickerDialog- Android studio Java
Does anyone know how to change the date format in DatePickerDialog in Android studio in Java, I need like "Mon, May 6" I need like this format instead of "M05 6, Mon"Image link .
...
0
votes
1
answer
124
views
Spring @DateTimeFormat exception when reading POST parameters
I am sending this string representation of date Apr 15, 2024, 12:00:21 PM as a POST parameter. I am trying to read it into Spring MVC @RequestMapping method like below:
public void updateRecord(@...
1
vote
0
answers
149
views
XMLGregorianCalendar with 6 milliseconds
I try to get a XMLGregorianCalendar entry which looks like
"06-09-2022 17:05:28:113319".
I call an extern api to get a timestamp in style like below. But I need it to call another api.
For ...
-1
votes
3
answers
227
views
Java 11 ZonedDateTime - Print Format
How could I manage to get the result of 2023-11-16T09:54:12.123 using the ZonedDateTime object in Java 11?
I wrote:
zdt.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
and got ISO_LOCAL_DATE_TIME: 2023-...
-1
votes
1
answer
489
views
Unable to convert String to LocalDateTime format "YYYYMMDDhhmmss" (week year) pattern with (day of month)
I'm getting the "DateTimeParseException" when parsing the given String:
I know using 'yyyy' and 'dd' are suggested on some questions, but i can't use them.
I use JDK 17
import java.time....
3
votes
3
answers
196
views
SAS date format - Struggling to get a neater solution
I am currently not at my workplace so I will update this later on. Essentially what I want is to have a date column transform into 2 Januari 2023 (the dutch month names)
I have build a date table and ...
-3
votes
1
answer
3k
views
How to create a OffsetDateTime in java with format 2023-05-05T06:52:27.954Z [duplicate]
I want to generate for example a date now like this format "2023-05-05T06:52:27.954Z"
for with a OffsetDateTime, for calling a method in Java which require a OffsetDateTime
dans the method ...
0
votes
0
answers
116
views
How to set the date format to dd/MM/YYYY for entire application in C#
We are generating few csv's when we have fr-FR culture then date will be dd/mm/yyyy
But when we have en-US culture date format will be mm/dd/yyyy.
How to set the date format to dd/mm/yyyy irrespective ...
0
votes
1
answer
557
views
MySQL date format change needed from data type as text
I have a dataset collected from Kaggle in which there is a column named DOB where its data type is TEXT. Example: Jan 30,2000.
I want to change the date format of that particular column to be like 30-...
0
votes
1
answer
3k
views
Can not deserialize value of type java.util.Date from String "Aug 29, 2023 5:48:51 PM": expected format "yyyy-MM-dd HH:mm:ss.SSS"
I am trying to parse this data "Aug 29, 2023 5:48:51 PM" which is in String format to JSON but getting the below error
Can not deserialize value of type java.util.Date from String "Aug ...
0
votes
0
answers
55
views
Android(4)-Java: Why is DateFormat incorrect? cannot be referenced from a static context CharSequence format=DateFormat.format("yyyy-MM-dd_HH:mm:ss"); [duplicate]
I tried to make screenshot programatically according to this video but there is error with CharSequence format:
error: non-static method format(Object) cannot be referenced from a static context
...
0
votes
2
answers
64
views
Convert character column into date column (month column) [duplicate]
I have the following data table, where the column month is a character-column. I want to convert this into a date format.
structure(list(delivYear= c("2018", "2018", "2018&...
-1
votes
2
answers
67
views
PHP date format from a very strange saved datetime string [duplicate]
I have a date time string saved in DB as 20230829130000
and in actuality this string means: 2023-08-29 13:00:00
I want it to be formatted properly like this: August 22, 2023, 1:00 pm
Is there any PHP ...
0
votes
2
answers
455
views
VBA giving wrong date format
I have a cell in a worksheet that uses VBA code to auto-enter the date that a new contact is added. Throughout the second half of July when I coded the macro, I have had no problems, but for some ...
0
votes
0
answers
99
views
Is timeStyle.long and .full broken, or have I done something wrong?
I am making an app in swift using Swift UI which uses several different date to string functions and they all seem to work ok for all the locales I've checked besides this one. This works for my home ...
1
vote
4
answers
126
views
How to parse a date string containing a numerical zone offset
I have this date in string "Fri, 14 Jul 2023 11:53:06 -0400"
and I am unable to convert it in LocalDateTime
I have tried this pattern "EEE, dd MMM yyyy HH:mm:ss z" and I have date ...
0
votes
3
answers
134
views
Use of DATE type in SQL/PLSQL
I found the following code wrritten by one of my colleague which runs perfectly.
UPDATE STUDENT_COURSE_INTERMISSION SCI
SET END_DT = '25-MAY-2024'
where END_DT = '28-MAY-2024'
I recomended to ...
0
votes
1
answer
54
views
How to convert json response with string dates to JS date automatically for multiple fields and classes?
I know that json does not treat dates in a special way and provides them as strings from the server.
The problem isn't converting the string into a date, but doing it manually for several fields and ...
0
votes
1
answer
127
views
Convert a datatime with milliseconds from a given data and a fiven fractional seconds
I have a given data, for example:
"2021-12-01 12:00:00" (i.e., %Y-%m-%d %H:%M:%S)
and a given millisecond: 3599.9. I wish to add this millisecond to the previus date in order to have the ...
0
votes
1
answer
1k
views
Convert datetime to string in sql
Using SQL language , trying to pull the same dates as you can see from the code as below;
select aa.sim
from app_date1 aa
left join
app_date2 bb on aa....
1
vote
1
answer
48
views
How to extract date from a specified column containing different types of date formats of a given Pandas DataFrame using Regex
def find_valid_dates(dt):
result = re.findall("\d{1,2}-\d{2}-\d{2,4}|\d{1,2} (?:januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december) \d{1,4}", dt)
...
-1
votes
2
answers
82
views
Swift DateFormatter returning tomorrow's date even after setting the Locale and Timezone
I'm using DateFormatter from Swift to show date to users in "yyyy.MM.dd" format. I find one thing very strange that even after I've set the Timezone, it gives me the date a day after.
let ...
0
votes
2
answers
2k
views
How can I format String '31/12/2023 00:00:00' to 'dd/MM/yyyy' as DateTime then String in Dart? [duplicate]
I stored the date in database as String and call it via model String? myDate;, the data save as 31/12/2023 00:00:00.
I want to dispaly in Text widget as 31/12/2023 not 31/12/2023 00:00:00 so I tried ...
1
vote
1
answer
301
views
SimpleDateFormat("MMM d, yyyy") returns Weekday Month day 00:00:00 EDT year [duplicate]
I have a String List [Apr 1, 2019, Aug 1, 2020, Feb 20, 2018] which i need to convert to Date format in the same pattern. When Im doing it with SimpleDateFormat("MMM d, yyyy") pattern Im ...
-2
votes
2
answers
69
views
Short Year and Month wise array data in PHP
I have an array below.
I want to short array in a year then month-wise. But my year is a two-digit value. Please check.
Array
(
[0] => Array
(
[0] => Mar-17
[...
0
votes
0
answers
105
views
'convert' statement of sql in pyspark or spark...?
Ok, so I'm trying to "translate" some stuff into pyspark. The statement that I have is the following:
CONVERT(VARCHAR(6), DATEADD(MONTH, -1, DATEADD(MONTH, -1, GETDATE())),112) AS ...
-3
votes
2
answers
590
views
How to convert different date formats in JDK11 to dd-mm-yyyy format? [duplicate]
I have a use case where I have date in the following formats,
2023-05-09T05:55:07Z
2023-04-30
08-05-2023
2023-05-09 00:00:00
31-Dec-2021
Irrespective of the input format I have a requirement to ...
1
vote
0
answers
346
views
Why json-patch changing the Date format
I am using json patch 1.13 version to apply patch on my json payload .
This is the POM Entry using for json patch
<dependency>
<groupId>com.github.java-json-tools</groupId>
<...
0
votes
1
answer
117
views
How to format a date inside a String with Java? [duplicate]
I have a String that receives the following date format (yyyy-MM-dd ...)
"2023-03-13 12:00:02"
and i need to change the format to the following (dd-MM-yyyy ...)
"13-03-2023 12:00:02....
3
votes
2
answers
11k
views
Spring Boot Jackson date format
I have a problem with Jackson in SpringBoot. My controller returns dates in format yyyy-MM-dd'T'HH:mm:ss'Z', but I need yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (for mwl-calendar in angular which uses date-fns ...
0
votes
1
answer
38
views
Formating date fields in bigquery
Im working with some date fields like the one i show in the next table:
Start Date
End Date
2021-07-06T23:00:00
2021-07-11T22:59:00
My expected output is:
Start Date
End Date
2021-07-06
2021-07-11
I ...
2
votes
2
answers
910
views
Print GMT+00:00 in DateTimeFormatter
I need to print the date something like "Fri Feb 24 2023 13:57:11 GMT+00:00"
with
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("E MMM d u H:m:s O", Locale.ENGLISH);
...
0
votes
3
answers
259
views
Convert date in pandas series
I need help: pandas dataset has a date column. The date in one of the columns is in the format "September 25, 2021 ". I can't convert this to "yyyy-mm-dd" format (2021-09-25). This ...
-1
votes
1
answer
284
views
Text '03/03/2023 01:56' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor [duplicate]
I get an unexpected exception when I try to parse a LocalDateTime (using JDK 8).
DateTimeFormatter DTF = DateTimeFormatter.ofPattern("dd/MM/yyyy hh:mm");
String dateStr = LocalDateTime.now()...
0
votes
2
answers
884
views
Using application property in Spring Boot annotation?
I have the following date field in my DTO class:
@JsonFormat(pattern="dd.MM.yyyy")
private LocalDateTime date;
I define the date format in my application.yml as shown below:
spring:
...
0
votes
0
answers
119
views
Google Apps Script dateformat issue for ISO8601 timezone
I have to format date in a google Apps script but i have a mistake.
In the oracle documentation (link in the google Apps script help )[https://docs.oracle.com/javase/7/docs/api/java/text/...
0
votes
2
answers
612
views
python, using columns without header and index
I have a table like this:
enter image description here
I want only date column and units column (column 1 and 5), but with date in another format.
I used code like this:
`import pandas as pd
...
1
vote
1
answer
1k
views
find ZonedDateTime is today, yesterday or else
I have a list of ZonedDateTime objects (Eg. 2023-01-01T20:40:01.001+05:30[Asia/Kolkata])
I need to write a method to get the below results.
if ZonedDateTime is today -> return "Today"
if ...
1
vote
2
answers
1k
views
Android retrofit - date format when passing datetime by URL
I have API method mapping like this
@POST("api/updateStarted/{id}/{started}")
suspend fun updateStarted(
@Path("id") id: Int,
@Path("started") started: Date
) : ...
0
votes
1
answer
163
views
Modify MatDatePicker for only month picking with overriding date format loacally
I want to make a datepicker in an Angular Material application, only for month picking. In the App Module I set up some providers for date locales which is needed in the app globally.
providers: [
...
0
votes
1
answer
637
views
Apex Interactive grid's Native HTML date picker display formate (mm/dd/yyyy) are changed to (dd/mm/yyyy) in edit form
I have an issue in interactive grid of oracle apex native html date formate. by default the formate shows (mm/dd/yyyy) but when i click the date picker to feed the date it is changed to (dd/mm/yyyy)?
...
0
votes
2
answers
2k
views
Date Formatter in Swift is not working properly
I am working with dates in Swift. I have to convert from String to Date but some weird stuff is happening. When I run my code on a simulator and pass my date string to formatter, it returns nil. But ...
-1
votes
1
answer
52
views
I have time 00:07:35.000000 in string format. How to change this to time format in bigquery?
SELECT ride_time, CAST (ride_time as INTERVAL) as ride_time_hr
ride_time -> str 00:07:35.000000
I am expecting 00:07:35
-1
votes
2
answers
202
views
Pass mm/dd/yyyy to yyyy-mm-dd date format
I would like to know if there is a function or a simple way to pass the format date mm/dd/yyyy
For example: 11/01/2022 (November 1st 2022)
To this format yyyy-mm-dd
For example: 2022-11-01
Nowadays, I ...
0
votes
2
answers
792
views
Spring Data, JPQL, Group by month of a date column(type LocalDate)
I have to get total price in month from a date yy-mm-dd with jpql query but I can't do it.
@Query(value = "select new com.talan.food.dto.MonthIncomes( function('date_format',date,'%Y-%m'),SUM(p....
1
vote
3
answers
690
views
Convert.ToDateTime can't converting Day/Month/Year
Format: Day/Month/Year - C#
Console.WriteLine(Convert.ToDateTime("28.12.2022 13:45:04")); //Error
It throws
System.FormatException: String was not recognized as a valid DateTime
I couldn'...
0
votes
2
answers
220
views
Maatwebsite LARAVEL: The imported date data is not the same as the date data entered into the database
I'm making a data import feature from excel using maatwebsite. I successfully imported the data into the database, but the year data that should have been 01/01/2022 and 31/12/2022 instead became 01/...
1
vote
1
answer
71
views
MYSQL: Get Upcoming Birthdays Year End Issue
Currently, I have a MySQL query to return upcoming birthdays from the current date to the next 7 days, and it is working fine, but since it's the end of the year I have issues getting results.
The ...
0
votes
4
answers
800
views
How do I add one year to this MySQL query?
SELECT date_format(CURDATE(), '%e-%b-%y');
This spits out the date to be 27-Dec-22 and I simply need to run another query so it shows 27-Dec-23