Ah, that makes sense. Thanks!
On Wednesday, May 15, 2019 at 11:11:06 AM UTC-4, Evgenij Ryazanov wrote:
>
> Hello.
>
> It looks like your timezone has a DST transition from 2019-03-10 02:00:00
> to 2019-03-10 03:00:00, so timestamp 2019-03-10 02:00:00 is not valid. This
> function always
Hello.
It looks like your timezone has a DST transition from 2019-03-10 02:00:00
to 2019-03-10 03:00:00, so timestamp 2019-03-10 02:00:00 is not valid. This
function always normalizes such timestamps.
You can use the TIMESTAMP WITH TIME ZONE data type to avoid issues on DST
boundaries.
SET
Seeing an issue where the output of FORMATDATETIME appears to be incorrect
for a particular value:
SET @date = '2019-03-10 02:00:00';
SELECT FORMATDATETIME(@date, '-MM-dd HH:mm:ss'), YEAR(@date),
MONTH(@date), DAY(@date), HOUR(@date);
FORMATDATETIME(@DATE, '-MM-dd HH:mm:ss')