954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Date conversion

Hi!

How can we convert date entered in (dd/mm/yyyy) format into (mm/dd/yyyy) format and vice versa at runtime?

nice_true
Light Poster
28 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

First Convert the string date to a Date Object liek this.
' This date is in (dd/mm/yyyy) format
Dim myDateObject = CDate(myDateString)

Then use the format function to convert the date format to your required (mm/dd/yyyy) format.
Dim strUSDate As String = Format(myDateObject, "MM/dd/yyyy")

Note, that i have used the capital MM as in format function lower case m means minutes.

Let me know. Read more code article on my site here

binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You