Hello
I have the following code to display the ordinal date on my pages:
The code works but is showing the time in Los Angeles which is thousands of miles from me (time difference = I am 8 hours ahead even if the servers are not).
Would I need to add +8 to this line:
Thanks!
I have the following code to display the ordinal date on my pages:
Code:
Function ReturnDate() As String
Dim theDate As String = ""
Dim NumericDayofMonth As Integer = Date.Now.Day
Dim OrdinalSuffix As String = ""
Select Case NumericDayofMonth
Case 1, 21, 31
OrdinalSuffix = "<sup>st</sup>"
Case 2, 22
OrdinalSuffix = "<sup>nd</sup>"
Case 3, 23
OrdinalSuffix = "<sup>rd</sup>"
Case Else
OrdinalSuffix = "<sup>th</sup>"
End Select
Dim NumericMonthofYear As Integer = Date.Now.Month
Dim MonthofYear As String = ""
Select Case NumericMonthofYear
Case 1
MonthofYear = "January"
Case 2
MonthofYear = "February"
Case 3
MonthofYear = "March"
Case 4
MonthofYear = "April"
Case 5
MonthofYear = "May"
Case 6
MonthofYear = "June"
Case 7
MonthofYear = "July"
Case 8
MonthofYear = "August"
Case 9
MonthofYear = "September"
Case 10
MonthofYear = "October"
Case 11
MonthofYear = "November"
Case 12
MonthofYear = "December"
End Select
theDate &= DateTime.Now.Day.ToString() '1, 2, 3, 4 etc
theDate &= OrdinalSuffix & " " 'st, nd, rd, th
theDate &= MonthofYear & " " 'Jan, Feb etc
theDate &= DateTime.Now.Year.ToString() '2013, 2014 etc
Return theDate
End Function
Would I need to add +8 to this line:
Code:
theDate &= DateTime.Now.Day.ToString()
Comment