Link to home
Start Free TrialLog in
Avatar of kwh3856
kwh3856Flag for United States of America

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
Avatar of DotNetLover_Baan
DotNetLover_Baan

Keep it string type. Then use string methods to make it.. say first day of that month.
Avatar of kwh3856

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
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
ASKER CERTIFIED SOLUTION
Avatar of DotNetLover_Baan
DotNetLover_Baan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kwh3856

ASKER

Thanks
you are welcome... :))