JohannIcon
Programmer
Dear All,
I am trying to format today's date to read as follows:-
Tuesday April 8th 2003.
I managed to create this:-
'*** Get the current year
todayYear = Year(Date())
' get the current month name
todayMonth = (MonthName(month(date)))
' get the current day name
todayDay = (WeekdayName(weekday(date)))
todayDayNum = Day(Date())
todayDateFormat = todayDay & " " & todayMonth & " " & todayDayNum & " " & todayYear
and this works fine.
However I was wondering if there is a way i can get the "th" after the 8 for example. What I want to do is for example if the day is 1, then I attach "st" with it, if it is 2, I attach "nd" with it, if it is 3, I attach "rd" with it etc. Is there a predefined function to do this?
Thanks for your help and time
I am trying to format today's date to read as follows:-
Tuesday April 8th 2003.
I managed to create this:-
'*** Get the current year
todayYear = Year(Date())
' get the current month name
todayMonth = (MonthName(month(date)))
' get the current day name
todayDay = (WeekdayName(weekday(date)))
todayDayNum = Day(Date())
todayDateFormat = todayDay & " " & todayMonth & " " & todayDayNum & " " & todayYear
and this works fine.
However I was wondering if there is a way i can get the "th" after the 8 for example. What I want to do is for example if the day is 1, then I attach "st" with it, if it is 2, I attach "nd" with it, if it is 3, I attach "rd" with it etc. Is there a predefined function to do this?
Thanks for your help and time