Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Invalid argument to date encode

153 views
Skip to first unread message

A Vasitch

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
Hi,

Not sure if this is related to DB but a client just received the message
'Invalid argument to date encode' installing on a new PC. Our application
is loaded at a number of client sites but this is the first time I have
heard this one. Anyone know what it means and why it is happening? I might
add, the LAN administrator at this client site has installed on other PCs
without any problems and also seems to think the date settings for other PCs
is the same.

Thanks

Alex

Mike Orriss (TeamB)

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
In article <7njl0p$45...@forums.borland.com>, A Vasitch wrote:
> Not sure if this is related to DB but a client just received the message
> 'Invalid argument to date encode' installing on a new PC.
>

It sounds like the Windows date format in the control panel is different
for that machine and you are issuing something like StrToDate.

A work-around is the place something similar to the following line at the
start of your app:

ShortDateFormat := 'dd/mm/yyyy'; // uses SysUtils

Mike Orriss (TeamB)
(Unless stated otherwise, my replies relate to Delphi 4.03)
(Unsolicited e-mail replies will most likely be ignored)


Marcelo Lopez Ruiz

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
>A work-around is the place something similar to the following line at the
>start of your app:
>
> ShortDateFormat := 'dd/mm/yyyy'; // uses SysUtils


You will also need to set Application.UpdateFormatSetting := False,
typically one line above it, so the application won't reread the values if
the user changes them from the Control Panel.

May the code be with you.

Marcelo Lopez Ruiz

Mike Orriss (TeamB)

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
In article <7nk8rk$4p...@forums.borland.com>, Marcelo Lopez Ruiz wrote:
> You will also need to set Application.UpdateFormatSetting := False
>

Thanks - that property had escaped me.

A Vasitch

unread,
Jul 28, 1999, 3:00:00 AM7/28/99
to
Thanks guys,

I do already have the ShortDateFormat := 'dd/mm/yyyy' statement in all my
products but I definitely do not have Application.UpdateFormatSetting :=
False. I will try this.

In the meantime if the user makes sure their Windows date format in Control
Panel is correct then this should not be a problem?

Alex

Mike Orriss (TeamB) wrote in message ...

Mike Orriss (TeamB)

unread,
Jul 28, 1999, 3:00:00 AM7/28/99
to
In article <7nlej6$64...@forums.borland.com>, A Vasitch wrote:
> In the meantime if the user makes sure their Windows date format in Control
> Panel is correct then this should not be a problem?
>

If when you say correct, you mean that the Windows date format matches that
passed to StrToDate functions, then yes.

0 new messages