on 06-24-2008 9:05 AM
Hi all,
In the Dynamic Configuration Section I can retrieve the name and timestamp of the inputfile I use. But the timestamp is in a format I don't quite understand.
For instance, the last changedate of the inputfile is 24-06-2008, 10:58. In the Dynamic Configuration section I find the timestamp "20080624T035800Z". There seems to be a difference of 5 hours here, and I have no idea what the "Z" on the last position means.
How can I convert this timestamp from the Dyn.Conf. to the actual timestamp?
Thanks,
William
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Swarup.
If I understand correctly your code is to convert a specific date into big decimal.
I need to convert the other way around though... so from yyyymmddThhmmssZ to dd-mm-yyyy hh:mm:ss
Is there a java-function that converts this long date into a "normal" dateformat, taking the timezone into consideration?
William
You can use subString to get the desired output.
There is no such Java Function available for you.
even TimeStamp differs your output
function myudf(String a, Container container)
{
//input is yyyymmddThhmmssZ
String year=a.subString(0,4);
String mon=a.subString(4,2);
String date=a.subString(6,2);
String hour=a.subString(9,2);
String min=a.subString(11,2);
String sec=a.subString(13,2);
// output is dd-mm-yyyy hh:mm:ss
String ret=date"-"mon"-"year" "hour":"min":"+sec;
return ret;
}
I think the time is different due to change in geographical areas. Check that.
'Z' may be the end delimeter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.