date format mmddyy in asp???

W

weiwei

hi,
is there anyway that I can validate my date format in asp?? I have
tried like date=now(), that gives me like 5/14/2004, the format should
be mmddyy, no space, no dash, and has to include 0 if month is from
1-9, for example 01, 02, like that????
please help me out
thanks in advance
Wei
 
D

DLBJR

Function FormatMyDate(dtmDate)
FormatMyDate = "Error"
If IsDate(dtmDate) Then
FormatMyDate = Right("00" & Month(dtmDate),2) & Right("00" &
Day(dtmDate),2) & Right(Year(dtmDate),2)
End If
End Functon

'from dlbjr

'Discerning resolutions for the alms
 

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

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top