Question
4
Replies
2323
Views
Instellars
Posted: June 20, 2016
Last activity: June 23, 2016
Closed
Solved
how to covert julian date to normal date format for example: juliandate- 2013123 should be as 3 May, 2013 or yyyymmdd format
how to covert julian date to normal date format for example: juliandate- 2013123 should be as 3 May, 2013 or yyyymmdd format
Message was edited by: Lochan to add Category
Hi Vineetha,
I am not sure about the OOTB rule to convert the Julian date into the regular date format, but I had written a code to convert the Julian date into the normal date as follows:
Code:
String input = "1999046";
DateFormat fmt1 = new SimpleDateFormat("yyyyDDD");
Date date = fmt1.parse(input);
DateFormat fmt2 = new SimpleDateFormat("MM/dd/yyyy");
String output = fmt2.format(date);
System.out.println(output);
Output: 02/15/1999
Hope this might help you in achieving your requirement.
Regards,
Mahesh