Hello,
I’ve checked up and down the forum and haven’t found this particular problem. I have a form that allows users to enter comments in a ‘NewComments’ field. When they click a ‘Submit’ button, the code grabs their name, the date and time and concatenates these into a huge string. In the ‘Comments’ field, it then prepends this huge string to any existing comments to create a comments history that has the following appearance:
05/12/2005 at 11:40:23 AM (Mark Herrmann)
Correspondence Type: Meeting
Attendees: Jane Doe, John Doe, John Smith
The text from the ‘New Comments’ field goes here…
05/04/2005 at 2:23:41 AM (John Smith)
Correspondence Type: Teleconference
Attendees: Mark Herrmann, Jane Doe
This is the previous message text…
Here’s my problem: I don’t want the seconds to show. This is easy enough to get rid of using:
TimeString = dt.DateOnly & " " & Format(dt.TimeOnly, “HH:MM”)
However, the time now shows up in military format!??
Any suggestions would be appreciated.
Mark
Subject: RE: Stripped seconds from time; now military
You searched all up and down the forum, but apparently didn’t read the help for the function you are using, which I would think would be less work. Go look – the answer is there.
Subject: RE: Stripped seconds from time; now military
OK, please enlighten me. Unless I’m missing something, I’m not sure what “function” you mean. (Before I put in the first post) I’ve looked through the R5 Yellow books and the R6 Designer Help: I see nothing on any of the time properties or methods that would help my particular situation. I apologize for wasting your time if I’m overlooking the obvious!Thank you.
Subject: RE: Stripped seconds from time; now military
These two entries under Format (the function you are trying to use) should be enlightening:
hh Hour of the day as a number with a leading zero (00 - 23).
AM/PM am/pm Uses hour values from 1 to 12, displaying AM or am for hours before noon, and PM or pm for hours after noon.
Subject: RE: Stripped seconds from time; now military
OK,
It’s official; I’m an idiot! I C&P the ‘Format’ function into my code and didn’t even think to look at that as I was so focused on the Properties & Methods!
Sorry, I will be more cognizant next time. Thanks for your help.
Mark