PDA

View Full Version : datediff function


madg3rr
06-24-2003, 02:08 AM
i m tring to find the diff between 2 dates... For example, submitdate & closedate.

for normal format, it will be using the
leadtime = datediff("d",submitdate, closedate)

closedate is the end date while submitdate is the start date...
the format of the dates is 23-Jun-03.

but the datediff function does not read dis format so my qns is how do i find the date difference wen my format is like so...

jsawkang
06-24-2003, 11:28 PM
Hi...

i'll change the "June" number if i were u.
u can use this for example
if smonth="Jan" Then
smth=1
elseif smonth="Feb" Then
smth=2
.
.
.
.
.
else
smth=12
end if

jsawkang
06-24-2003, 11:31 PM
u r missing some syntax at the back of ur code
here how i compare date
DateDiff("d", ndate, strfutureday)*1

and i attached a file while manipulate date. check it out.