[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

yyyyMMdd HHmmss To MM/dd/yyyy hh:mm:ss tt

Posted on 2006-05-05
4
Medium Priority
?
3,507 Views
Last Modified: 2012-06-21
I have a date in
"yyyyMMdd HHmmss"
format and I need to convert it to
"MM/dd/yyyy hh:mm:ss tt"
format, is there an easy method in VB.NET to do this? or do I need to write my own parsing function?
0
Comment
Question by:davidtrina
4 Comments
 
LVL 7

Expert Comment

by:davidrichardson
ID: 16613600
0
 
LVL 3

Accepted Solution

by:
HouseMusic earned 400 total points
ID: 16614660
       Dim strOrigDate As String = "20060505 125555"
        Dim myCIintl As New Globalization.CultureInfo("en-US", False)
        Dim dtNewDate As DateTime = DateTime.ParseExact(strOrigDate, "yyyyMMdd HHmmss", myCIintl)
        Dim strNewDate As String = Format(dtNewDate, "MM/dd/yyyy hh:mm:ss tt")
0
 
LVL 5

Expert Comment

by:MageDribble
ID: 16615285
0
 
LVL 1

Author Comment

by:davidtrina
ID: 16616483
upped the points to show appreciation
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

834 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