PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Date to String
Date to String
Iniciado por guest, 26,ene. 2018 04:18 - 2 respuestas
Publicado el 26,enero 2018 - 04:18
Hi All

I am needing some code to format the system date and system time as follows:

year-month-day hh:mm:ss

Cheers
André
Publicado el 26,enero 2018 - 04:51
Andre

There you go:

DateToString(DateSys(), "YYYY-MM-DD ")+timeToString(timeSys(), "HH:MM:SS")

// eg 2018-01-25 20:50:14

HTH

King
Publicado el 26,enero 2018 - 06:35
Thanks a ton King. It would have taken me quite some time to work that one out. So many options. I get all mixed up with languages. And in the case of PCSoft sometimes lost in translation :-)

Cheers
André