I'm a little blockheaded right now…
I have a date string in european format dd.mm.yyyy and need to transform it to mm.dd.yyyy with classic ASP. Any quick ideas?
If its always in that format you could use split
d = split(".","dd.mm.yyyy")
s = d(1) & "." & d(0) & "." & d(2)
this would allow for dates like 1.2.99 as well
Dim arrParts() As String
Dim theDate As Date
arrParts = Split(strOldFormat, ".")
theDate = DateTime.DateSerial(parts(2), parts(1), parts(0))
strNewFormat = Format(theDate, "mm.dd.yyyy")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With