From: Boris P. on
It's not possible to retrieve a friendly named date description
including the weekday name from the OS, is it?

I am looking for a function that would return for example

Monday, 05.01.2010 (in English->LCID 1033)
and
Montag, 01.05.2010 (in German->LCID 1031)

I would like localize my invoices, and I don't want to rely on my own
mechanisms.
From: dpb on
Boris P. wrote:
> It's not possible to retrieve a friendly named date description
> including the weekday name from the OS, is it?
>
> I am looking for a function that would return for example
>
> Monday, 05.01.2010 (in English->LCID 1033)
> and
> Montag, 01.05.2010 (in German->LCID 1031)
>
> I would like localize my invoices, and I don't want to rely on my own
> mechanisms.

W/O looking extensively for anything new under the sun, all I'm aware of
is GetLocalTime() which returns its namesake in a

typedef struct _SYSTEMTIME { // st
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;

structure.

There are C runtime libraries that will format given various time
configurations; whether there are any that are language aware to do as
you want automagically I've no clue...

--
From: David Kerber on
In article <ukIps8JFLHA.4316(a)TK2MSFTNGP06.phx.gbl>,
bpnotvalid(a)nospamhotmail.com says...
>
> It's not possible to retrieve a friendly named date description
> including the weekday name from the OS, is it?
>
> I am looking for a function that would return for example
>
> Monday, 05.01.2010 (in English->LCID 1033)
> and
> Montag, 01.05.2010 (in German->LCID 1031)
>
> I would like localize my invoices, and I don't want to rely on my own
> mechanisms.

Will the format$() function return localized day names?

From: Mike Williams on
"Boris P." <bpnotvalid(a)nospamhotmail.com> wrote in message
news:ukIps8JFLHA.4316(a)TK2MSFTNGP06.phx.gbl...

> I am looking for a function that would return for example Monday,
> 05.01.2010 (in English->LCID 1033)
> and
> Montag, 01.05.2010 (in German->LCID 1031)

Perhaps you might like to expand on your explanation. Neither 5th January
2010 nor 1st May 2010 fall on a Monday and in any case the English
arrangement of dd:mm:yyyy is the same as the German arrangement. By
"English" do you perhaps mean "American" (which of course is not the same
thing!). But even then, despite the American habit of jumbling up the
dd:mm:yy into a nonesensical order, neither the fifth day of January 2010
nor the 1st day of May 2010 is a Monday! America does indeed have a
nonsensical arrangement of date parts, but even they are not quite so
nonsensical as to mix up the day names!

Mike





From: Larry Serflaten on

"Boris P." <bpnotvalid(a)nospamhotmail.com> wrote
> It's not possible to retrieve a friendly named date description
> including the weekday name from the OS, is it?

See Named Date/Time Formats (Format Function)
You may settle on using the system's long date format.
If locale aware, it is also user configurable. Try this:

Debug.Print Format(Now, "Long Date")

See what you get on your own system....

LFS


 |  Next  |  Last
Pages: 1 2
Prev: Compart two times
Next: Multi file explorer