Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
50 views

I'm trying to figure out how to get a more complete date in kotlin, not just something that says Tue, Jan 1 but has the ordinal part of the day, so Tue, Jan 1st I have tried searching ordinal date in ...
Neglected Sanity's user avatar
1 vote
0 answers
85 views

Currently, in Java I have tested using IBM SimpleDateFormat and Java DateTimeFormat, both cannot parse "Rab, 25 Agt 2025" due to IBM and Java only recognize "Agu" Is there any ...
Deddy Chandra's user avatar
5 votes
1 answer
191 views

I have a string: String inputDate = "18-FEB-24 10.02.33.578000000 AM"; I am trying to read it back and format it in YYYY-MM-DD HH:mm:ss.SSSSSS. I tried the SimpleDateFormat as well as ...
malife89's user avatar
3 votes
3 answers
304 views

I am having confusion on understanding the following piece of code: public static void main(String[] args) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); ...
Asgar's user avatar
  • 2,410
3 votes
3 answers
157 views

I have some old Java code that attempts to parse a string using SimpleDateFormat. It is frequently throwing a ParseException: Non-fatal Exception: java.text.ParseException: Unparseable date: "06:...
AndroidDev's user avatar
  • 21.4k
0 votes
0 answers
96 views

I have the below query: INSERT INTO TEMP_USAGE_REPORTING (SELECT ABC.EPCCLASS_ID, ABC.EPCCLASS_SEARCH_PAT, ABC.SERIAL, ABC.EVENT_RECORD_DT, ABC.EVENT_RECORD_TM FROM (SELECT EVENT_EPC....
Aditya Ranjan's user avatar
-2 votes
1 answer
139 views

Sorry to ask if this is a duplicate question as I try to find solutions online but couldn't get a confirmed answer. I would like to know the possible values that can be used to parse using ...
Trowa's user avatar
  • 365
-2 votes
2 answers
232 views

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 . ...
Joy's user avatar
  • 27
0 votes
0 answers
82 views

I have an iOS/Android app sending data to the Python backend. In both apps, the user selects a date and time from a picker, and it is sent to the server: Android: SimpleDateFormat simpleDateFormat = ...
alstr's user avatar
  • 1,604
2 votes
1 answer
158 views

code is SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); Date date = format.parse("2024-03-01 09:20:46"); the date's value is Sun Dec 03 00:01:09 ...
yifu_yang's user avatar
0 votes
1 answer
94 views

I want to parse a Date from a String in NYC timezone, add 1 day and then output string. like: parse to date add 1 day output The problem is, that when I parse a date during the adjustment for ...
VextoR's user avatar
  • 5,235
2 votes
1 answer
725 views

I have a date string as "1/10/24 7:00 PM" (10th Jan.2024). How to parse it using SimpleDateFormat? String date_time = "1/10/24 7:00 PM"; Instant answer; try { answer = Instant....
Shivam Agrawal's user avatar
1 vote
3 answers
832 views

I am using SDF to parse a string date to millis with below code private fun dateToMilliseconds(dateValue: String): Long? { val sdf = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS") val date: ...
WISHY's user avatar
  • 12.1k
-1 votes
2 answers
117 views

How to convert a string with extra characters String str = "file-09-01-2024" pattern = "dd-MM-YYYY" using SimpleDateFormat with pattern = "dd-MM-YYYY" I don't know how ...
Ignatyo's user avatar
  • 25
0 votes
0 answers
123 views

In my case, i am in need of get the string date as format i prefer , below is the exact code i am using to get the return date as string Below is the Test Function: @Test fun `get formatted server ...
arun's user avatar
  • 245
0 votes
1 answer
153 views

Somehow parsing date time strings and converting them to milliseconds after the epoch works differently in different environments. It would seem something is off with the timezone or something. In ...
Adam Wise's user avatar
  • 2,341
1 vote
2 answers
139 views

Can someone please explain why is the behavior of the below piece of code not as expected. import java.util.Calendar; import java.util.Date; import java.text.SimpleDateFormat; public class Test { ...
Nagraj1990's user avatar
2 votes
2 answers
117 views

I'm trying to convert two dates into this pattern: yyyy-MM-dd HH:mm:ss.SSS. I need to retrieve two dates: Last year, same month, day 1, 00:00:00.000 Last day of previous month, 23:59:59.999 So, as ...
Marco Frag Delle Monache's user avatar
-2 votes
2 answers
543 views

I am getting response from ELK and mapping it to an object using ObjectMapper and then return the response as JSON. The ELK response has a Date datatype field with the format yyyy-MM-dd HH:mm:ss....
Keerthana Hemachandran's user avatar
0 votes
2 answers
436 views

I am on Windows 10 with Java 17 using Simple Date Format. I am trying to get a date format like 2023-10-12 21:26:16 but instead I get 2023-Oct-12 21:26:16. The date is inside a Jackson 2.15 ...
Ray Bond's user avatar
  • 487
3 votes
1 answer
332 views

fun calculateAge(dateString: String): String { val dateFormat = SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z") dateFormat.timeZone = TimeZone.getTimeZone("GMT") ...
MARSH's user avatar
  • 331
0 votes
1 answer
388 views

I have a released android app and a strange issue has cropped up with a specific device. On analysis of Crashlytics data, I found that the app is crashing for this particular user (and device) because ...
oTwo's user avatar
  • 285
0 votes
0 answers
74 views

I am trying to convert the Date received from Server to user specific date format (IST) and returning as Date datatype. Attached the sample code and result as below import java.text.SimpleDateFormat; ...
Prakash's user avatar
  • 669
0 votes
3 answers
5k views

I want to print the date with the char ":" in the middle of timezone, example : 2023-08-02T14:19:10+02:00 At the moment I am using this pattern: SimpleDateFormat("yyyy-MM-dd'T'HH:mm:...
monotor's user avatar
  • 117
0 votes
1 answer
204 views

I recently changed... continents and temporarily forgot to signify July 27th 2023 in the European way, i.e "27/07/2023", and instead maintained the American - style literal "07/27/2023&...
Jason's user avatar
  • 3,005
-1 votes
2 answers
1k views

I am trying to convert date from this format "dd/MMM/yyyy" to "yyyyMMdd", for Java 1.8 version ,the code was working fine, my code is SimpleDateFormat inputFormat = new ...
user3608694's user avatar
1 vote
1 answer
301 views

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 ...
Gunel Hasan's user avatar
-1 votes
2 answers
653 views

I cannot convert the date containing GMT to timestamp in Java Here is the code shown below import java.sql.Timestamp; import java.text.ParseException; import java.text.SimpleDateFormat; import java....
Sercan Noyan Germiyanoğlu's user avatar
0 votes
0 answers
64 views

Need alternative for toJavaDatePattern method which is available in HsqlDateTime class from jar - hsqldb-2.3.1. Method usage - Converts the given format to pattern acceptable by SimpleDateFormat. ...
Ragas's user avatar
  • 147
0 votes
1 answer
186 views

Why is ParseException not caught here? When I enter a date consisting of more than 4 digits it just accepts it, but it shouldn't as I set lenient to false. When I enter letters for the year I get ...
Ievgeniia Leleka's user avatar
-3 votes
2 answers
591 views

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 ...
Diksha Goyal's user avatar
0 votes
1 answer
117 views

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....
Root93's user avatar
  • 137
0 votes
4 answers
2k views

I am trying to convert UTC time to local time, including daylight saving. Localtime (Stockholm), in summer, should be 2 hours ahead of UTC, but when I convert it in Java it only adds one hour. public ...
Pacmyc's user avatar
  • 51
0 votes
1 answer
182 views

I'm developing an Android app in Kotlin, and I'm using the DatePickerDialog to allow the user to select a date. However, I've noticed that when the user selects a month, the value passed to the ...
Anantashayana's user avatar
0 votes
2 answers
264 views

I am using simple date format to convert the following into number of seconds Input : 00:00:10.000 , 00:05:10.000, 01:00:23.000 Expected output : 10 seconds , 310 seconds , 3623 seconds Below is how I ...
WISHY's user avatar
  • 12.1k
1 vote
1 answer
105 views

I'm using SimpleDateFormat to get the hours and seconds in this format "HH:MM a" for 2 dates in same function. The output printing is same for both of them and it is mostly of the first date....
PT15's user avatar
  • 13
-1 votes
2 answers
90 views

I'm trying to parse a String date like :Mon Dec 28 15:18:16 2021 into some thing like this: yyyy-MM-dd HH:mm:ss z. This is my code. public void parseDate(String stringDate) throws ParseException { ...
rvicente's user avatar
0 votes
2 answers
155 views

I want to convert a date format into another date format. For example, I have this String "05-Apr-23" and I want to convert it into this String "05/04/23". And I did this ...
elvis's user avatar
  • 1,286
-2 votes
3 answers
1k views

I have the date 2023-04-03 and wanted to convert it into UTC time with range (start and end of the day) 2023-04-03T00:00:00 -> 2023-04-02T18:30:00z 2023-04-03T24:00:00 -> 2023-04-03T18:30:00z ...
Anuj kumar's user avatar
1 vote
5 answers
497 views

I am encountering some issues right now when I compare two dates in Java. I want to check that a date is the same day on the next week that today. First, I am doing this: SimpleDateFormat sdf =...
Cucumberbatch's user avatar
0 votes
2 answers
1k views

Im working with some dates in Java. Trying to parse some string date inputs to Date objects. This is done using SimpleDateFormat.parse(String date). When I use the SimpleDateFormat of "yyyyMMdd&...
Keham Makene's user avatar
-2 votes
1 answer
97 views

I have a date field on which I am calling datepicker in the following format : $(function() { $('.dob').datepicker({ dateFormat: 'dd/MM/yyyy', }); }); When the user selects ...
Ananya's user avatar
  • 25
-4 votes
2 answers
3k views

Actually we are using a "timestamp = System.currentTimeMillis()", which is an Epoch time! We are looking to convert the same to normal format ex: 15-03-2020 (dd-mm-yyyy). We are using: ...
Akshay Prakash's user avatar
0 votes
2 answers
57 views

When I get a timestamp date data from the database, I convert it to the format I want through simpledateformat, and everything is normal here, and the date and time are correct when I test it with ...
黃奕翔's user avatar
-4 votes
1 answer
278 views

In a data stream, I'm receiving date attribute values in milliseconds in Pacific timezone. Like for date = Wed Jan 18 2023 18:00:00 Pacific Time, I'm receiving milliseconds value as 1674064800000. It ...
sahillearner's user avatar
0 votes
0 answers
156 views

I would like to set up a functionality for Google Sheets that provides a start and end day for a given week index number of the year. When using the Utilities.parseDate and Utilities.formatDate ...
tp43793's user avatar
0 votes
0 answers
120 views

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/...
Bertrand BALDACH's user avatar
0 votes
1 answer
350 views

I'm quite new to the Java and for the use case I would like to know how to convert String "2023-02-01" into "02012023" I had troubles understanding the correct usage of ...
Markus's user avatar
  • 3
-1 votes
1 answer
197 views

For certain input values though format and all things are correct, I am getting ParseException from SimpleDateFormat.parse(String input) method. I'm in a scenario where I need to convert time from ...
Risabh Gupta's user avatar
0 votes
2 answers
831 views

I have a question. I need to convert and display the data from database which it's a timestamp to date format only. *the format is dd/MM/yyyy Currently I writng the code like this but the error says &...
Syafiza Surani's user avatar

1
2 3 4 5
54