Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Convert

Status
Not open for further replies.

Nebooaw

Programmer
Jun 1, 2001
142
GB
Hi, how can i convert a d-m-y date to a m-d-y date with a function?

i have the following string... "13-10-2004 11:28:13" which needs converting to "10-13-2004 11:28:13"

Can anyone help?


Kind regards
 
Something like this ?
d="13-10-2004 11:28:13"
MsgBox Mid(d,4,3) & Left(d,3) & Mid(d,7)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
thanks for replying - think you way is better than...

dim datearray, dd, mm, yyyy
datearray = split(Request.Form("lastmodified"), "/")
dd = Datearray(0)
mm = Datearray(1)
yyyy = Datearray(2)

Cheers,

Nebooaw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top