1

I want to convert the date from former to later format 2020-04-14T14:56:43

TO

2020-04-14 14:56:43 UTC

Basically how to convert the DATETIME into TIMESTAMP IN Dataprep?

Mikhail Berlyant
  • 117,385
  • 6
  • 77
  • 139
  • And after this effort to get to TIMESTAMP, your application will NOT be usable in February, 2038. Check the date range, please. โ€“ Wilson Hauck Apr 16 '20 at 19:36
  • As old data is stored in the timestamp format in bigquery which is loaded by Dataprep now i am doing few modifications and wanted to know how to convert into timestamp through Dataprep . I have data in epoch which i converted into the my own timezone using dataprep but i am unable to convert into timestamp now .Can anyone help me ? 2020-04-14ยท14:56:43+00:00 This is what the output i reached till now needed this one 2020-04-14 14:56:43 UTC with timestamp โ€“ BI TaxiEngineer Apr 17 '20 at 09:04

1 Answers1

0

Why would you want to use TIMESTAMP instead of a DATETIME? because it's smaller in size? (4 bytes vs 8 bytes) Are you using MYSQL? I understand that there it's converted to UTC on write, and then converted back to the server's timezone on retrieval. (which isn't happening for DATETIME) Or in general, working with timezones?

anyway, you can just remove the T in the middle between the date and the time by brushing over it, and replacing it with an empty space. And if you desire to add a timezone (which would be.. +00), you can do that aswell. Trifacta will recognize that as a valid date type.

IF it's a unix-timestamp you're interested in - you can do that aswell with the function "unixtime()".

you can see all the tokens with which to construct and change your datetype here: https://docs.trifacta.com/display/SS/Datetime+Data+Type

also, the community-website has a lot of dateformats-related questions. https://community.trifacta.com/s/

Amit Miller
  • 116
  • 2
  • And after this effort to get to TIMESTAMP, your application will NOT be usable in February, 2038. Check the date range, please. โ€“ Wilson Hauck Apr 16 '20 at 19:36