Users enter comments in to a form, and their comments include a Time Stamp. This is plain text. I’m using a formula to get the time on the server, and make sure it’s in Eastern time. This is added to a History field on the document.
For most users, their time stamp is in this format:
02/03/2005 01:12 PM
However, for one particular user, his time stamp is this:
2005-02-03 13:12
The same code is used for all users. What would cause the one user’s time stamp to be different? Is this a Windows data/time preference, or a user preference in Lotus Notes?
Subject: That is a User Windows preference. Control Panel, Regional and Language Options (in XP).
You can use the Format Statement in LS if you must have the stamp in the same format. i.e.eval = Evaluate( |@Now([ServerTime] : [LocalTimeOnError]; “| + serverName + |”))
Using the “/” character doesn’t guarantee the date will be formatted that way. I’ll need to check for that too.
/ (slash) Date separator. Separates day, month, and year in formatted date values. The actual date separator used in the returned formatted value is the date separator specified in the operating system’s international settings.
Subject: RE: That is a User Windows preference. Control Panel, Regional and Language Options (in XP).
If you read more carefully in the documentation of Format, I believe you’ll find there’s a way to “escape” a character to get that exact character.
However, I’d like you to also consider storing the dates in a multivalued date field instead of text. Otherwise, users with date formatting preferences other than your “standard” formatting may misinterpret dates such as 04/05/2005 – is that April 5 or May 4? You can convert it using @Text in a Computed for Display field, and concatenate the multivalue field containing the comment text.
Subject: RE: That is a User Windows preference. Control Panel, Regional and Language Options (in XP).
Thanks for the advice. Our corporate standard has always been MM/DD/YYYY. The users expect this format.
I’m using the formula to get a time-stamp. It is always in Eastern US time, even if the user is in a different time zone.
You see… This is part of our technical support call tracking system. The support user enters new comments. When they save the document, these new comments are appended to a rich-text “history” field, along with the user’s name, and the time-stamp. It’s just text.