Convert text to timestamp in redshift
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a text field "presence_changed_at" with text values i.e. '2014/12/17 08:05:28 +0000 . I need to convert this into timestamp. In postgreSQL there is function TO_TIMESTAMP() , however in redshift this does not seem to be supported. I can get the date without time by TO_DATE("presence_changed_at",'YYYY/MM/DD HH24:MI:SS') which produces 2014-12-12 but i can't find any way to get TIMESTAMP format. Thanks in advance for solving this 回答1: try convert function: convert(timestamp,presence_changed_at) 回答2: It's surprisingly horrible to get a