Sign in to follow this  
Followers 0
tinjaw

Can dates be read from GUICtrlCreateDate in ISO format?

3 posts in this topic

#1 ·  Posted (edited)

I have built an application that does date calculation. It works just fine when the locale is US. However, different international locales format the date differently and it is breaking my parsing code.

$DTS_LONGDATEFORMAT 0x04 Displays the date in long format. The default format string for this style is defined by LOCALE_SLONGDATEFORMAT, which produces output like Friday, April 19, 1998.

$DTS_TIMEFORMAT 0x09 Displays the time. The default format string for this style is defined by LOCALE_STIMEFORMAT, which produces output like 5:31:42 PM.

I am looking for something that might be called $DTS_ISO_8601. That way I am assured that the date will be in a specific format.

[update] I'm just manually setting the format to yyyy-MM-dd.

Edited by tinjaw

Share this post


Link to post
Share on other sites



I have built an application that does date calculation. It works just fine when the locale is US. However, different international locales format the date differently and it is breaking my parsing code.

I am looking for something that might be called $DTS_ISO_8601. That way I am assured that the date will be in a specific format.

The only script I can think of where this is dealt with is james3mg meal planner here.

But searching might find others.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

The only script I can think of where this is dealt with is james3mg meal planner here.

But searching might find others.

Thanks for the suggestion Martin.

I was once again trying to address the problem of letting the use work with dates in their native format, yet still do valid date math with dates as native date objects instead of as strings. Alas, AutoIt just isn't capable of that. I would have to resort to WinAPI calls, and that is more than I want to do for this tiny application.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0