to_date('30/03/2022', 'DD/MM/YYYY')
Underlined, as hours are not specified, that means that hour is '00:00' I would like to specify that this is for Europe/Paris time zone region. Can you help me set-up this ? Thanks
to_date('30/03/2022', 'DD/MM/YYYY')
Underlined, as hours are not specified, that means that hour is '00:00' I would like to specify that this is for Europe/Paris time zone region. Can you help me set-up this ? Thanks
Copyright © 2021 Jogjafile Inc.
A
DATEdata type has the components: year, month, day, hour, minute and second. It ALWAYS has those components and NEVER stores anything else (such as a time zone); so it is impossible to store a time zone in aDATEdata type.A
TIMESTAMPdata type has the components: year, month, day, hour, minute and second and, optionally, can store fractional seconds.A
TIMESTAMP WITH TIME ZONEdata type has the components: year, month, day, hour, minute, second and time zone and, optionally, can store fractional seconds information.Therefore, if you want to store a time zone then you should use
TIMESTAMP WITH TIME ZONEand notDATE.Your code would then be:
or using a timestamp literal:
or, if you want to pass in your date in that format and add the time zone in a two-step process:
db<>fiddle here