'Just try this for date and i think this is the longest way which i ever saw
in same way try for time def(1)
Code:
dim abc,def,ghi,j
abc="10/2/2008 4:24:05 PM"
def=split(abc," ") 'Split by space " "
'def(0) will be "10/2/2008"
'def(1) will be "4:24:05"
'def(2) will be "PM"
'again split def(0) by slash
ghi=split(def(0),"/") 'Split def(0) by slash "/"
j=mid(ghi(2),1,1) 'Here it checks for the 2nd character ie: before "08" & after "2" in the string "2008"
if j=9 then
(^4-9)(0-9)\/ (^3-9)(0-9)\/ 19*(0-9)(^0-7)
else if j=0 then
(^4-9)(0-9)\/ (^3-9)(0-9)\/ 20*(0-9)(0-9)
else if j=1 then
(^4-9)(0-9)\/ (^3-9)(0-9)\/ 21*(0-9)(0-9)
.
.
.
.
.
else if j=9 then
(^4-9)(0-9)\/ (^3-9)(0-9)\/ 29*(0-9)(0-9)
end if
in same way try for time def(1)