Skip to content

Instantly share code, notes, and snippets.

@upidea
Created September 18, 2018 08:01
Show Gist options
  • Select an option

  • Save upidea/a741a637bb3ff54cfd2607cf4e1dd4ce to your computer and use it in GitHub Desktop.

Select an option

Save upidea/a741a637bb3ff54cfd2607cf4e1dd4ce to your computer and use it in GitHub Desktop.
select to_char('2018-04-26 22:23:40', 'yyyyMMdd');
select date_format('2018-04-26 22:23:40', 'yyyyMMdd');
select date_format('2018-04-26 22:23:40', 'yyyy-MM-dd HH:mm:ss');
select to_char('2018-04-26 22:23:40', 'yyyy-MM-dd hh24:mi:ss');
select date_format(to_unix_timestamp(nvl('2018-04-26 22:23:40', '')), 'yyyyMMdd');
select from_unixtime(unix_timestamp('20171205 22:23:40','yyyymmdd HH:mm:ss'),'yyyy-mm-dd HH-mm-ss');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment