Forums Register Login

Dates parsing related

+Pie Number of slices to send: Send
Hi,

I have a date sch_date_time=01/02/2014 08:00
and when i am doing SimpleDateFormat sdf = new SimpleDateFormat("dd/mm/yyyy HH:mm");

date1 = sdf.parse(sch_date_time);

when i am printing date1 it is printing as Wed Jan 01 08:00:00 IST 2014,but it should be printed as Sat Feb 01...

please help me out guys what is the problem?


+Pie Number of slices to send: Send
Look at your pattern. "mm" can't mean both minutes and month at the same time, can it?
+Pie Number of slices to send: Send
Thanks bear for your quick response yes that is only the problem...

Bear Bibeault wrote:Look at your pattern. "mm" can't be mean both minutes and month at the same time, can it?

 
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 471 times.
Similar Threads
Date 01/01/1970 returning non-zero value for time
Date format related question
Problem with day light savings in Simple Date Formatter
Comparing two date inputs
Calculation of months between two dates
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:06:35.