Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Simple answer to a necessary requirement. A full ...
Author:
m
E-mail:
Click to e-mail author
Submitted:
4/19/2003
Version:
VB6
Compatibility:
VB6
Category:
Date/Time
Views:
13943
Simple answer to a necessary requirement. A full format date presented as (e.g.) Tuesday, 1st Apr 2004.
Declarations:
'none
Code:
Public Function FullFormatDate(theDate As String) ' ' IN - theDate to be dd/mm/yyyy or dd/mm/yy ' OUT (e.g.) - Tuesday, 1st Apr 2004' Dim wkDD as string wkDD = Format(theDate, "DD") Select Case wkDD Case 1, 21, 31 wkDD = Format(wkDD, "#0") & "st" Case 2, 22 wkDD = Format(wkDD, "#0") & "nd" Case 3, 23 wkDD = Format(wkDD, "#0") & "rd" Case Else wkDD = Format(wkDD, "#0") & "th" End Select FullFormatDate = Format(theDate, "DDDD, ") & wkDD & Format(theDate, " MMM YYYY") End Function
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement