Time date in defrent formats

Started by erezpaz, August 27, 2017, 10:04:17 AM

Previous topic - Next topic

erezpaz

Hi

I am collecting date and time from a windows task schedule. It come in format: YYYY:MM:DD:HH:MM:SS. I using timeformat function to convert the time and date to compare it to TimeDate ( ) function. In some windows the TimeDate ( ) present : Sun 27/08/2017 20:00:10 and in some windows it present Sun 08/27/2017 8:00:10 PM. How can i know up front and create the right process to compare it to right format?

Thanks
Erez

JTaylor

Why not use TimeYmdHms( )?

Also, you can find the format in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\win.ini[Intl]

Jim

erezpaz

I am not using TimeYmdHms since i want to present the user a human-readable format. so i am getting current time from using TimeDate() then comparing that to time date i collected from Windows task in YYYY:MM:DD:HH:MM:SS format. I want to convert the YYYY:MM:DD:HH:MM:SS to same format i get from TimeDate().

JTaylor

Use TimeYmdHms( ) get the datetime and use TimeFormat() for presentation purposes.

Jim

JTaylor

....or use both TimeYmdHms( ) and TimeDate() if you don't have access to TimeFormat().

Jim