Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Date type field

Posted on 2004-08-25
6
Medium Priority
?
178 Views
Last Modified: 2010-04-23
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
0
Comment
Question by:kwh3856
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 11895090
Keep it string type. Then use string methods to make it.. say first day of that month.
0
 

Author Comment

by:kwh3856
ID: 11895113
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
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 11895124
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 2000 total points
ID: 11895137
Now the DateString is in the format "05/01/2004".. now you can parse it to Date type...
0
 

Author Comment

by:kwh3856
ID: 11895185
Thanks
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 11895227
you are welcome... :))
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question