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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
sbxr
Contributor III
Contributor III

System current Date time in Julian

Hi,

 

For A field in Tmap i want to generate Julian value of current Datetime . how can i do that,

Please help.

 

 

 

FYI @rhall @shong 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

If you have created the function in a routine, then you can call the routine in a job like this:
for testing, on a tJava component:
int julianDateValue=yourRoutineName.convertToJulian(TalendDate.getDate("dd.MM.yyyy") );
System.out.println(julianDateValue);

Regard
Shong

View solution in original post

8 Replies
TRF
Champion II
Champion II

sbxr
Contributor III
Contributor III
Author

hi @TRF

 

I saw the solution, but don't know how to implement that please help me , this is really urgent

 

Regards

TRF
Champion II
Champion II

You need to transpose that to a routine
sbxr
Contributor III
Contributor III
Author

i have created the routine using the code mentioned in the link. but how to use it for TalendDate.getDate("yyyy-MM-dd") to convert in julian
Anonymous
Not applicable

If you have created the function in a routine, then you can call the routine in a job like this:
for testing, on a tJava component:
int julianDateValue=yourRoutineName.convertToJulian(TalendDate.getDate("dd.MM.yyyy") );
System.out.println(julianDateValue);

Regard
Shong

Anonymous
Not applicable

Hi,

I believe following link will help you in this scenario:

 

https://community.talend.com/t5/Design-and-Development/How-to-convert-calendar-date-to-julian-using-...

 

Regards,

Bhagwat

sbxr
Contributor III
Contributor III
Author

Thanks @shong @TRF @bhagwatn 

The issue got resolved now.

 

sbxr
Contributor III
Contributor III
Author

FYI @shong @TRF 

With the code attached i am able to convert date to julian but please help me in the code for datetime

in below mentioned format

TalendDate.getDate("yyyy-MM-dd HH:mm:ss.SSS")

 

Please find the attached routine

 


Date_To_Julian.txt