Function SweDate(thedate)
Dim y,m,d
if IsDate(thedate) then
y = Year(thedate)
m = Month(thedate)
d = Day(thedate)
if y < 50 then
y = y + 2000
elseif y < 100 then
y = y + 1900
end if
SweDate = CStr(y) & "-" & Right("0" & CStr(m),2) & "-" & Right("0" & CStr(d),2)
else
SweDate = ""
end if
End Function
Function SweTime(thedate)
Dim h,m
Dim ST
if IsDate(thedate) then
h = Hour(thedate)
m = Minute(thedate)
ST = Right("0" & CStr(h),2) & ":" & Right("0" & CStr(m),2)
if ST = "00:00" then
ST = ""
end if
else
ST = ""
end if
SweTime = ST
End Function