I have what should be a simple piece of LS code to format the date …
meettime=Format(curDoc.StartTime(0),“HH:MM”)
However, this code is producing a format of HH.MM not HH:MM.
This is strange! Can anyone guide me.
I have what should be a simple piece of LS code to format the date …
meettime=Format(curDoc.StartTime(0),“HH:MM”)
However, this code is producing a format of HH.MM not HH:MM.
This is strange! Can anyone guide me.
Subject: Format date not working in LS ??
Henry,
Format() doesn’t care what the developer wants, it insists on using the separator defined in Regional Options of the Windows Control Panel (or for non-Windows users, I would presume whereever it looks for regional settings).
I ran into this problem trying to manipulate Switzerland dates to use a “/” instead of a “.” . To resolve this, I used Format() to rearrange the month, day, year in the order I wanted, then surrounded that result with Replace() to change the “.” to a “/” and force the issue once and for all.
Ken
Subject: RE: Format date not working in LS ??
Ken, thanks for the response.
I have found it is even worse than that. You may have set a Country option that should give you the format you want, but some Registry entries will over-ride that. That was my problem. Even though I had it right in Control Panel, HKEY_Users/…/Control Panel/International had something else.
Thanks a lot, Gates.