PDA

View Full Version : Solved: Current Timestamp "Now" funtion format change



aziztt
12-04-2008, 06:15 AM
I use the "now" function in a textbox to get the timestamp of the systems time but its very basic time and date.

for example TextBox1 = Now

I get the following result "04/12/2008 13:11:42"

Is there a way to change the format to say "04/DEC/2008 1.11PM" or "04/DEC/2008 13:11" without the seconds showing?

CreganTur
12-04-2008, 06:40 AM
For military time:
Format(Date,"mm/dd/yyyy") & " " & Format(Time,"h.Nn")

Bob Phillips
12-04-2008, 06:41 AM
TextBox1.Text = Format(Now, "dd/mmm/yyyy h:mm AM/PM")

aziztt
12-04-2008, 07:26 AM
cheers xld! just what i needed, nice and simple coding!