Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Converting Java dates to Julian Dates

how do you convert Java dates to julian dates using talend?
Labels (3)
1 Reply
_AnonymousUser
Specialist III
Specialist III
Author

Hi Jamie,

After speaking directly, we found that Jamie was trying to convert longs (number of milliseconds since the epoch) to regular date fields.

In order to do this, we need to read the data in as a long, and then convert it to a date type. I used a tMap from the long to date (dont forget to set the date format in the schema to "MM/dd/yyyy"), and the transform expression for the date field is:

new Date(row1.LongDate)

output looks like:

1240001474750|04/17/2009
1240770188953|04/26/2009
1241957891640|05/10/2009
1242236149265|05/13/2009
1242070538187|05/11/2009
1242300633500|05/14/2009
1245587646531|06/21/2009
1245684007687|06/22/2009
1190027854328|09/17/2007

HTH,

Thomas