lowercase am / pm

J

John Berman

Hi

I use:

todaysdatetime = FormatDateTime(Now)
to feed the date time into a variable and I get as expected something like
this:

2/28/2004 11:51:07 AM

but what I want it the am / pm markers in lower case like

2/28/2004 11:51:07 am

Would this be easy to achive ?

Regards

John Berman
(e-mail address removed)
 
S

Steven Burn

todaysdatetime = FormatDateTime(Now)
If InstrRev(todaysdatetime, "AM") then
todaysdatetime = replace(todaysdatetime, "AM", "am")
ElseIf InstrRev(todaysdatetime, "PM") then
todaysdatetime = replace(todaysdatetime, "PM", "pm")
Else
'Nothing
End If

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
E

Evertjan.

John Berman wrote on 28 feb 2004 in
microsoft.public.inetserver.asp.general:
todaysdatetime = FormatDateTime(Now)
to feed the date time into a variable and I get as expected something
like this:

2/28/2004 11:51:07 AM

but what I want it the am / pm markers in lower case like

2/28/2004 11:51:07 am

Would this be easy to achive ?

todaysdatetime = lcase(FormatDateTime(Now))

[vbscript]
 
J

John Berman

Thanks, works a treat


John B

Evertjan. said:
John Berman wrote on 28 feb 2004 in
microsoft.public.inetserver.asp.general:
todaysdatetime = FormatDateTime(Now)
to feed the date time into a variable and I get as expected something
like this:

2/28/2004 11:51:07 AM

but what I want it the am / pm markers in lower case like

2/28/2004 11:51:07 am

Would this be easy to achive ?

todaysdatetime = lcase(FormatDateTime(Now))

[vbscript]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,146
Messages
2,570,831
Members
47,374
Latest member
anuragag27

Latest Threads

Top