Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread datetime languages
Thu, Mar 13 2008 3:13 PMPermanent Link

"Harry de Boer"
LS

Read a lot in NG's etc. but can't quite figure out how to do it proper:

An app that runs on a pc with shordateformat dd-mm-yy gives errors when it's
running on a pc with settings dd.mm.yy. I thought that changing the
dateseparator at the beginning of the app would be the solution but now
errors occur when using formatdatetime('dd-mm-yyyy', date) functions (used a
lot).

What's the way to deal with this most easily?

Regards, Harry

Fri, Mar 14 2008 7:14 AMPermanent Link

The Engine component has something like FormatAnsiDateTime which outputs
the proper formats for you. You need to quote it still.

/Matthew Jones/
Fri, Mar 14 2008 8:32 AMPermanent Link

"Harry de Boer"
Matthew,

Thanks, however, my question was not related to EDB.

Harry

"Matthew Jones" <matthew@matthewdelme-jones.delme.com> schreef in bericht
news:memo.20080314110739.23428E@nothanks.nothanks.co.uk...
> The Engine component has something like FormatAnsiDateTime which outputs
> the proper formats for you. You need to quote it still.
>
> /Matthew Jones/

Fri, Mar 14 2008 9:22 AMPermanent Link

When does it happen then?

/Matthew Jones/
Mon, Mar 17 2008 4:35 AMPermanent Link

"Harry de Boer"
Matthew,

> When does it happen then?
I'm getting errors Smile

Maybe I must rephrase my question: what's the proper way to create apps that
work with different local setting and avoid problems with functions like
Formatdatetime?

Regards, Harry



"Matthew Jones" <matthew@matthewdelme-jones.delme.com> schreef in bericht
news:memo.20080314131553.6132A@nothanks.nothanks.co.uk...
> When does it happen then?
>
> /Matthew Jones/

Mon, Mar 17 2008 8:41 AMPermanent Link

Where are you getting the errors. I assumed you were using dates in SQL or
filters, but apparently not. Without knowing where you are using these
functions, that is, the context of the error, it is hard to assist. "I'm
getting errors" is rather like a user's error report, not a programmers!

/Matthew Jones/
Mon, Mar 17 2008 12:59 PMPermanent Link

"Harry de Boer"
Matthew,

I thought it was obvious from the first post I got errors when using the
formatdatetime function,  but -rereading it- maybe you're right and wasn't I
clear enough. Sorry for that. Because you specify the format as string as
the first parameter of the function changing locales gives an error because
the format is wrong.e.g 'dd-mm-yyyy' or 'dd.mm.yyyy' are the formats in
Dutch and German. I tried  'dd'+dateseparator+'mm'+dateseparator+'yyyy' but
an error occurs saying that's it's an incorrect date value.

Regards, Harry

"Matthew Jones" <matthew@matthewdelme-jones.delme.com> schreef in bericht
news:memo.20080317123418.7596B@nothanks.nothanks.co.uk...
> Where are you getting the errors. I assumed you were using dates in SQL or
> filters, but apparently not. Without knowing where you are using these
> functions, that is, the context of the error, it is hard to assist. "I'm
> getting errors" is rather like a user's error report, not a programmers!
>
> /Matthew Jones/

Mon, Mar 17 2008 2:20 PMPermanent Link

"Malcolm"
Harry de Boer wrote:

> Matthew,
>
> I thought it was obvious from the first post I got errors when using the
> formatdatetime function,  but -rereading it- maybe you're right and wasn't I
> clear enough. Sorry for that. Because you specify the format as string as
> the first parameter of the function changing locales gives an error because
> the format is wrong.e.g 'dd-mm-yyyy' or 'dd.mm.yyyy' are the formats in
> Dutch and German. I tried  'dd'+dateseparator+'mm'+dateseparator+'yyyy' but
> an error occurs saying that's it's an incorrect date value.
>

You could try the following format specifiers:
   'ddddd' for  the system short date format
   'dddddd' for the long date
Then you don't have to worry about the actual format.
If your users don't like it they can fix it for themselves.  Surprised
But maybe this is not what you are looking for?

Malcolm

--
Tue, Mar 18 2008 5:10 AMPermanent Link

"Uffe Kousgaard"
"Harry de Boer" <harry@staaf.nl> wrote in message
news:A32CD1C4-96D3-428A-929A-B4CADD22DFE6@news.elevatesoft.com...

> I tried  'dd'+dateseparator+'mm'+dateseparator+'yyyy' but
> an error occurs saying that's it's an incorrect date value.

Maybe it is the date value and not the format that is the problem?

Tue, Mar 18 2008 7:04 AMPermanent Link

> Maybe it is the date value and not the format that is the problem?

That would be my thought too. The output format would, I think, work all
the time. The date is the problem.

/Matthew Jones/
Image