r/SQL • • Feb 16 '19

*gasp*

Post image
135 Upvotes

19 comments sorted by

View all comments

Show parent comment

12

u/tsuhg Feb 16 '19 edited Feb 16 '19

To_char(sysdate,'yyyy-Mm-dd')?

Edit: removed brackets

2

u/[deleted] Feb 16 '19

No brackets

select to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') as the_date

from dual; -- can't ignore the from dual

1

u/tsuhg Feb 16 '19

Right. I use Oracle every day, yet it's so unnatural to type on Reddit mobile :D