Most voted "simpledateformat" questions
Simpledateformat is a Java class used for formatting and Parsing dates and times. Therefore, it can convert Strings to java.util.Date and vice versa.
Learn more…16 questions
Sort by count of
-
9
votes2
answers4470
viewsConvert date dd/mm/yyyy to yyyy-mm-dd’T'HH:mm:ss
How do I convert a date into format dd/mm/yyyy for the format supported by Sqlite yyyy-MM-dd'T'HH:mm:ss? Example: public static String converteStringEmData(String stringData) throws ParseException {…
-
4
votes2
answers184
viewsI cannot format date
I’m trying to format one date to look like another, the first comes straight from the bank but the other needs to be in the same format. Calendar cal = Calendar.getInstance(); SimpleDateFormat df =…
-
3
votes3
answers1314
viewsHow to handle different date formats?
I have an application that at a certain time I recover the obtained date from the system, save it in a table in the database (Sqlite) and then recover it. The problem is that in determinator devices…
-
2
votes2
answers300
viewsError formatting date:
Hello, I’m formatting the date with the following code: Date data = null; SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { data =…
-
2
votes2
answers1383
viewsPrint current month and the next two months
I’m taking the current month in number and need to increment it two more months ahead, besides using the current month and saving in a string array. I’m taking the whole and retrieving the name of…
-
2
votes1
answer608
viewsConvert date from one format to another
I’m making an application for Android that uses the Apoid API of NASA. To do this, the user enters a date, and when clicking the button, a photo of the galaxy referring to the date typed appears.…
-
1
votes1
answer1361
viewsRemove input field options of type datetime-local
I have an input field type datetime-local and I need it to be as clean as possible, without cleaning buttons or step and just displaying the date and time in this format: '12/12/2016 12:01', I would…
-
1
votes2
answers1197
viewsHow to save to Date type in this format 10-10-2017 using Simpledateformat?
How to save a Date in format 10-10-2017 using SimpleDateFormat? Date data = null; SimpleDateFormat formato = new SimpleDateFormat("yyyy/MM/dd"); try { data = formato.parse(dataInicio); } catch…
-
1
votes0
answers404
viewsJaspersoft - Date Format
Hello, We have the following version of Jaspersoft: <serverInfo> <build>BUILD_DATE_STAMP_BUILD_TIME_STAMP</build> <dateFormatPattern>yyyy-MM-dd</dateFormatPattern>…
-
1
votes2
answers187
viewsAndroid - How to create a comparison so that items from LISTVIEW are displayed or not according to the date?
I’m creating an app that will show open pharmacies on a certain date: I created a listview with 10 lines (pharmacies)... And according to the day of the month certain units will be displayed... or…
-
1
votes1
answer87
viewsFormat dates including offset
I’m not able to format in this pattern: 2020-10-01T11:34:00.270-03:00. SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); System.out.println(inputFormat.format(new…
-
1
votes1
answer79
viewsWrong timezone in JAVA
I’m making an application where I need to show in a graph the real time of the capture of a certain data I tested that code: SimpleDateFormat format = new SimpleDateFormat("hh:mm:ss");…
-
1
votes1
answer32
viewsSimpledateformat am/pm format returns "afternoon" instead of "PM"
Using a solution to this question: https://stackoverflow.com/questions/6907968/how-to-convert-24-hr-format-time-in-to-12-hr-format In doing the following: Int hour = 13; SimpleDateFormat _24HourSDF…
-
0
votes0
answers1488
viewsHow to format date in UTC format for yyyy-mm-dd
I am working with the XML of an NF-e where the date fields are in UTC format (YYYY-MM-Ddthh:mm:ssTZD) and need to insert them into the database in yyyyyy-mm-dd format. I’m using Simpledateformat to…
-
0
votes1
answer1422
viewsConvert String to Date From yyyy-mm-dd to dd-mm-yyyy format
I made a Java endpoint that contains the date information. The date is received as string in the format 'yyyy-mm-dd'. I need to convert to Date dd-mm-yyyy format. I am using the following format…
-
-1
votes1
answer48
viewsHow to compare dates?
I created an NN/NN/NNNN mask in my editText to capture due date, without a calendar, all done in edt. Then I used Simpledateformat to capture the current system date. I made a comparison with the…