Jump to content

unidbdatetimepicker within unidgrid using mm/dd/yy & dd/mm/yyyy


demetris

Recommended Posts

I need to run on the same machine 2  versions of the same application for different clients.

 

the one uses mm/dd/yyyy and the other dd/mm/yyyy

 

I do have a unidbgrid and in  it a date field edited by a unidbdatetimepicker.

 

 

The unidbdatetimepicker validates against the regional settings giving an error for the one with different format.

 

How can I get around this?

Link to comment
Share on other sites

This is how I did it:

 

https://unigui.miraheze.org/wiki/Format_Date_in_Local_Format

 

Basically, I  create a new copy of TFormatSettings and use their local setting in it.

 

Then I setup up some types of date formats:

MM/DD/YYYY

MM/DD/YY

etc.

 

Then I call fmtDate ( source is in the link)

 

and it changes MM/DD/YYYY to DD/MM/YYYY 

or MM/DD/YY to MM/DD/YY 

 

depending on what is in TFormatSettings

 

Let me know if you have any questions about the source in:

https://unigui.miraheze.org/wiki/Format_Date_in_Local_Format

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...