Re: wxDateTime and date validation

Paris Rossano <[email protected]> Wed, 30 Apr 2025 14:17:50 +0200
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
It works on my side ... please see the attached image.
I suspect your problem is due to other than wx itself

Is the code executed in an application (EXE) or in a library (DLL)?


On 30/04/2025 13:21, Tim Burgess wrote:
> Yes,with the same result
> best wishes.
>
> Tim Burgess
>
>
>> On 30 Apr 2025, at 11:43, Rossano Paris <[email protected]> wrote:
>>
>> Did you try with the following code?
>>
>> wxString temp = “2020-01-01”;
>> wxDateTime myDate;
>> myDate.ParseISODate(temp);
>>
>>
>> On Wednesday, 30 April 2025 at 12:02:17 UTC+2 Tim Burgess wrote:
>>
>>     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/0240494c-e602-41f4-a647-c8bec45e57b8n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/wx-users/0240494c-e602-41f4-a647-c8bec45e57b8n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> -- 
> 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/4C400DF9-1872-434D-B918-5D5D72BCDB25%40gmail.com 
> <https://groups.google.com/d/msgid/wx-users/4C400DF9-1872-434D-B918-5D5D72BCDB25%40gmail.com?utm_medium=email&utm_source=footer>.

-- 
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/5196d93b-2886-419e-945c-9902df11241d%40escadasolutions.com.
parse-date.png (image/png, 15.1 KB) - not displayed