Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String to Date Conversion

Status
Not open for further replies.
Feb 20, 2002
64
US
I need to convert a bunch of Text Strings to Date. Any help would be appreciated.

SCENARIO:
I have 1260 records with Dates with the Format of YYYYMMDD, They are in Text Fields. How can I go about converting them to a date format so I can evaluate them in other apps?
 
Create a function like:
Public Function MakeDate(InDate As Variant) As Date
MakeDate = CVDate(Left$(InDate, 4) & "/" & Mid$(InDate, 5, 2) & "/" & Mid$(InDate, 7, 2))
End Function
 
Hi, this might be a bit of a stupid question,
but how would you call this function for a selection?

I have the same problem and have tried a different approach to no avail.

-Nathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top