rtc DD-MM-YY to mysql YYYY-MM-DD-HH-MM

For general Flowcode discussion that does not belong in the other sections.
Post Reply
viktor_au
Posts: 61
http://meble-kuchenne.info.pl
Joined: Wed Jul 12, 2023 7:09 am
Has thanked: 11 times
Been thanked: 19 times

Flowcode v11 rtc DD-MM-YY to mysql YYYY-MM-DD-HH-MM

Post by viktor_au »

Hi all
The mysql table requires the datetime format as: YYYY-MM-DD HH:MM:SS
Flowcode RTC component gives me a choice of:
0= DD:MM:YY
1= MM:DD:YY

Looks like I have to read and save the values separately as:
YY, MM, HR, MIN (set Secs as 00)
And reformat it to:
YYYY-MM-DD-HH-MM-00
----------------------
Is it some way to do it faster?
Thanks

Steve-Matrix
Matrix Staff
Posts: 2026
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 300 times
Been thanked: 467 times

Re: rtc DD-MM-YY to mysql YYYY-MM-DD-HH-MM

Post by Steve-Matrix »

Hi Viktor,

We're looking into this and hopefully will make an updated component soon.

chipfryer27
Valued Contributor
Posts: 2104
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 469 times
Been thanked: 698 times

Re: rtc DD-MM-YY to mysql YYYY-MM-DD-HH-MM

Post by chipfryer27 »

Hi Viktor

Until Steve updates the component, could you not have your server convert?

You may be able to use the DATE_FORMAT and TIME_FORMAT mysql commands to change.

Just a thought.

Regards

Post Reply