I want to find out how long time there is till a specific Weekday
from Now
.
I have searched everywhere, but can't really find anything.
I THINK I have to use the DateDiff
-function together with the WeekDay
-function somehow.
The scenario is:
I have variable varWeekDay
with the day of the week, ex: 1 / 2 / 3 / 4 / 5 / 6 / 7
And another variable varStartTime
with a time of the day: hh:mm
And the last variable varStopTime
also with a time of the day: hh:mm
if varWeekday = Weekday(now, 2) and varStartTime < formatdatetime(now, 4) then
.... Write how long time till start in hours / minutes
elseif varWeekday = Weekday(now, 2) and varStartTime >= formatdatetime(now, 4) and varStopTime < formatdatetime(now, 4) then
response.write("Already started!")
else
.... Write how long time till start in days / hours / minutes
end if
"How long time" could be like: "2 days, 3 hours and 27 minutes from now"
The same output should be generated from a specific datetime. Ex: 06/08/2012 23:55 is "1 day and 13 minutes from now"
I really hope you guys can help! :)