Re: wxDateTime and date validation

Tim Burgess <[email protected]> Wed, 30 Apr 2025 12:21:52 +0100
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
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 .

--

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 .