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
kwh3856Asked:
Who is Participating?
 
DotNetLover_BaanCommented:
Now the DateString is in the format "05/01/2004".. now you can parse it to Date type...
0
 
DotNetLover_BaanCommented:
Keep it string type. Then use string methods to make it.. say first day of that month.
0
 
kwh3856Author Commented:
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
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
DotNetLover_BaanCommented:
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
0
 
kwh3856Author Commented:
Thanks
0
 
DotNetLover_BaanCommented:
you are welcome... :))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.