VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Display System time as 'Wednesday, 2nd April, 2003' or in any order just swap postion of WeekdayNam

by Dave Lewis (1 Submission)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 4th February 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Display System time as 'Wednesday, 2nd April, 2003' or in any order just swap postion of WeekdayName etc.

Rate Display System time as 'Wednesday, 2nd April, 2003' or in any order just swap postion of WeekdayNam



Dim attn As String
If Day(Date) = 1 Then attn = "st"
If Day(Date) = 2 Then attn = "nd"
If Day(Date) = 3 Then attn = "rd"
If Day(Date) > 3 Then attn = "th"
Text1.Text = "" & _
"   " & WeekdayName(Weekday(Date), False, vbSunday) & _
",  " & Day(Date) & attn & _
"   " & VBA.MonthName(VBA.Month(Date)) & _
",  " & VBA.Year(Date) '& _       add if moving postion
End Sub

Download this snippet    Add to My Saved Code

Display System time as 'Wednesday, 2nd April, 2003' or in any order just swap postion of WeekdayNam Comments

No comments have been posted about Display System time as 'Wednesday, 2nd April, 2003' or in any order just swap postion of WeekdayNam. Why not be the first to post a comment about Display System time as 'Wednesday, 2nd April, 2003' or in any order just swap postion of WeekdayNam.

Post your comment

Subject:
Message:
0/1000 characters