formatting the mssql date/time stamp output

greetings.  i have a particular problem where i need to take the output of an mssql date/time stamp and format it from:

8/18/2004
10:48:10 AM

to

Aug 18

or Aug 18 2004

any ideas?
LVL 1
nmotionAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
fritz_the_blankConnect With a Mentor Commented:
Sure, do this:

arrDateParts = Split(FormatDateTime(Date(),1)," ")

Now arrDateParts(0) will hold the long day name,  arrDateParts(1) the long month, arrDateParts(2) the day number and etc.

Just mix and match, i.e. response.write(arrDateParts(1) & " ' arrDateParts(2))

FtB
0
 
fritz_the_blankCommented:
Sure--use formatDateTime()

For details, please see:

http://www.devguru.com/Technologies/vbscript/quickref/formatdatetime.html

FtB
0
 
fritz_the_blankCommented:
Response.Write(FormatDateTime(Date(),1))

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
nmotionAuthor Commented:
any way to omit certain parts of the output?
0
 
nmotionAuthor Commented:
Thanks a bunch!!
0
 
fritz_the_blankCommented:
Glad to have helped,

FtB
0
All Courses

From novice to tech pro — start learning today.