Subject Re: [IBO] TIB_DateTimeEnh and EditMask
Author Geoff Worboys
> I have a DATE type field in a table. Display mask is
> set to 'dd.mm.yyyy'. What is the best EditMask to get
> the same display format regardless Windows
> date format settings.
>
> When I set Windows format to 'dd.mm.yyyy' and leave
> field EditMask blank , when editing I'm getting
> 'dd,mm,yyyy' default edit mask
> (note there is comma instead of dot).

Note that EditEnh masks emulate the standard VCL masks in regard to
special locale characters.

When defining the mask: '.' is used to represent the current locale
decimal separator, ',' the thousand separator, '/' the date separator
etc. When the mask runs it replaces those characters with the actual
characters of the current locale. This allows the same mask to be
interpretted correctly whereever it runs.

To use these characters specifically (and ignore their significance in
the current locale) you need to use the literal indicator in the
mask...
'00\.00\.00'


Note that the mask processing does NOT recognise the day, month, year
indicators as provided for by displayformat processing. So (for the
moment at least) you are stuck with ensuring the editmask matches the
format returned by the AsString of the column. I use:

::NM::!90!/!90!/!0000;0;_;0

But then this matches my shortdate format and would cause problems if
the shortdate format was 'yyyy/mm/dd'.

In hindsight the current support is inadequate and needs fixing. I am
in the middle of moving house at the moment and wont be able to get to
this for at least a week, and must admit that even then I am not
certain how long it will take to implement. I need to work out the
best way to implement this with minimal impact on existing processing.

How urgent is your requirement?


Geoff Worboys
Telesis Computing