Hi, I want to update a table using SQL, and put the system time in a 6,0 field.
My problem is if the minutes or seconds are between 1-9, I don't get a leading 0
So 4:07:06 pm returns 1676, but I want 160706
I have tried various formatting, concat, substring of CURRENT_TIME etc, but no luck yet
example
EXTRACT(HOUR FROM CURRENT_TIME) || EXTRACT(MINUTE FROM CURRENT_TIME) || EXTRACT(SECOND FROM CURRENT_TIME) AS HHMMSS
My problem is if the minutes or seconds are between 1-9, I don't get a leading 0
So 4:07:06 pm returns 1676, but I want 160706
I have tried various formatting, concat, substring of CURRENT_TIME etc, but no luck yet
example
EXTRACT(HOUR FROM CURRENT_TIME) || EXTRACT(MINUTE FROM CURRENT_TIME) || EXTRACT(SECOND FROM CURRENT_TIME) AS HHMMSS
Comment