Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitpatil1993
Contributor II
Contributor II

What Date time function to use for "2020-01-06T19:12:34.000Z" to upload in Salesforce ?

 Hello 

I have a date 2020-01-06T19:12:34.000Z in string format in a CSV file which is supposed to be uploaded in Salesforce in Date Time format.
Note :The format of date remains the same for Salesforce.

I tried multiple ways but not posting here to avoid confusion for the reader.
So, What is the ideal way of doing such operation ?

Labels (2)
4 Replies
TRF
Creator III
Creator III

What is "ZA" supposed to be?

If you have datetime based on GMT, here what you should have "2020-01-06T19:12:34.000+0000".

For South Africe, it should be "2020-01-06T19:12:34.000+0200"

rohitpatil1993
Contributor II
Contributor II
Author

I am Sorry. My mistake. @TRF 

2020-01-06T19:12:34.000Z

This is the format for Source and Target both.

manodwhb
Creator III
Creator III

yyyy-mm-ddThh:mm:ss. sssZ
is the format you need to use.TalendDate.parseDate("yyyy-mm-ddThh:mm:ss.sssZ", yourStringData)
rohitpatil1993
Contributor II
Contributor II
Author

@manodwhb 

It didn't work when I used the same format which you suggested.

BUT it worked after using the function in this way TalendDate.parseDate("yyyy-mm-dd'T'hh:mm:ss.sss'Z'", row8.Date_Visite) in expression builder.

But for example 2020-01-06T19:12:34.000Z  -  input, for which after parsedate function the output is 

2020-01-06T19:12:00000Z

Do you know why I am facing issue with recording Seconds? 
I tried replacing . with : TalendDate.parseDate("yyyy-mm-dd'T'hh:mm:ss  :  sss'Z'", row8.Date_Visite) but didn't work.