Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: ocean10000
=time - 2 hours
I need to write the time in this format: 12:30pm but -2 hours so it write 10:30am because my server is 2 hours ahead of MY time zone.
Also...I am trying to write a date like this:
May 10th, 2005.
and then anywhere I want put "Monday" so something like:
Today is <% =MyWeekDay %> and the date is: <% =MyFormattedDate %>
If anyone has any suggestions or cooments I would greatly appreciate it. Thanks
[edited by: Woz at 8:57 am (utc) on May 10, 2005]
[edit reason] No Sigs please, see TOS#13 [/edit]
Here's how you'd do the code in full...
ServerDate = Now()
MyDate = DateAdd("h", -2, ServerDate)
DateArray = Split(FormatDateTime(MyDate,vbLongDate),", ")
MyDay = DateArray(0)
MyDateSection = DateArray(1)
MyYear = DateArray(2)
Today is <%=MyDay%> and the date is: <%=MyDateSection%>, <%=MyYear%>
This will work if your server uses the English Language. I'm not sure about foreign languages.