Convert STRING to DATETIME/TIMESTAMP

26 views
Skip to first unread message

Jatin Dutta

unread,
Apr 26, 2020, 12:06:25 PM4/26/20
to CDAP User
Hi,

I have a datetime in string format coming from source as : 04-16-2020 14:09:14
When I use wrangler and PARSE -> as a SImple Date, then the output looks like - 0010-10-09 14:09:14 UTC

Below is the wrangler directive:

parse-as-simple-date :date_column yyyy-MM-dd HH:mm:ss 

Can anyone let me know how to convert a STRING into DATETIME or TIMESTAMP or DATE ?

Thanks in advance.

Regards,
Jatin

Albert Shau

unread,
Apr 27, 2020, 12:29:27 PM4/27/20
to cdap...@googlegroups.com
Hi Jatin,

You'll need to specify the format string to match your data. 'MM-dd-yyyy HH:mm:ss' looks more appropriate for your example.

Regards,
Albert

--
You received this message because you are subscribed to the Google Groups "CDAP User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cdap-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cdap-user/57d05338-db9a-45c6-8fda-81f1bf193eda%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages