Forum Moderators: open
We are located 15 hours ahead of our server and I want to dispaly our day of week time etc.
Timeus=dateAdd("h",15, time)
The time with us is: <%response.write Timeus%>.
Which give the time Ok but I can't figure out how to display the day ie Its wednesday today (some times we are into the next day ahead of our server) etc
I have tried the below but it still shows the same day even if I know we are into the next day
<%response.write WeekdayName(weekday(dateAdd("h",15,date)))%>
Any ideas appreciated-Thanks
Timeus = DateAdd("h",15,now)
When you use DATE, the time is always midnight, so adding 15 hours to midnight on the current day still makes it the same day.
Adding 15 hours to "now" however, could possibly roll over into the next day if 15 hours from now is tomorrow and tada, you're in the future. When you get this running though, don't tell us what happens in the next 15 hours because we like to be surprised :)
var1 = dateAdd("h",15,Now())
Response.Write("var1 = " & var1 & "<br>")
Response.Write("For var1 the weekday is " & WeekDay(var1, 1) & "<br>")
Response.Write("For var1 the weekdayname is " & WeekDayName(WeekDay(var1), false, 1) & "<br>")
Returns:
var1 = 7/22/2004 12:10:13 AM
For var1 the weekday is 5
For var1 the weekdayname is Thursday