wxDateTime and date validation

"Tim Burgess" <[email protected]> Wed, 30 Apr 2025 11:02:08 +0100
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
Hi,

 

I have some code that stores a date generated from a wxDatePicker in ISO
format:

 

datePicker->GetValue().FormatISODate()

 

Example result:

 

2020-01-01

 

However, I'm failing to retrieve this stored value in a form that I can use
to set the value of the wxDatePicker. Here's my code:

 

wxString temp = "2020-01-01

";

wxDateTime myDate.ParseISODate(temp);

 

In this example, myDate takes the value wxInvalidDateTime.

 

My project requires that I store the date in ISO format and I assume I'm
missing something simple.

 

Any and all suggestions would be most welcome.

 

Best wishes.

 

Tim

 

 

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/019301dbb9b6%24efe01c70%24cfa05550%24%40raisedbar.net.