kwh3856
asked on
Date type field
I am currently reading a .txt file in a data stream. One of the fields is a date field. In the file the date looks like
0504
This would indicate May of 2004. How should I format this field in my Dimension statement? How would I end of with a value of 05/??/2004.
Thanks
Kenny
0504
This would indicate May of 2004. How should I format this field in my Dimension statement? How would I end of with a value of 05/??/2004.
Thanks
Kenny
Keep it string type. Then use string methods to make it.. say first day of that month.
ASKER
Once I have converted it to a string and parse it out to how I need it, how do I then save it back out as a date string or is there any conversion that needs to be done?
Thanks
Kenny
Thanks
Kenny
Dim DateString As String
DateString = "... get the data in it (0504)
'Format the string
DateString = DateString.SubString(0,2) & "/01/20" & DateString.SubString(2)
-Baan
DateString = "... get the data in it (0504)
'Format the string
DateString = DateString.SubString(0,2) & "/01/20" & DateString.SubString(2)
-Baan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
you are welcome... :))