DateFormats

Mehyar

Junior Contributor
Joined
Jun 9, 2003
Messages
371
Location
Lebanon
Hello to All.....

I am having a very hard time with date formats..

I need to make the dates in my application all take the format mm/dd/yyyy no matter what regional settings the user has..

This applies to DateTimePickers, Date variables etc...

I have tried setting the CurrentCulture but it seems i am missing something.....

If SomeoneSolvesThis Then
While True
MsgBox("Thank You!!")
End While
End If
 
I am not sure what your question is. Are you try to parse the date format of mm/dd/yyyy to date type or you try to print out the date type to the format of mm/dd/yyyyy?

- To parse the string to date use the parse function:
Dim tdate As Date
tdate = Date.Parse(m_textbox1.Text)

- To format the date format to the format of mm/dd/yyyy
Dim strDate as string
strDate = Format(Now(), "MM/dd/yyyy")


Hope that what you are looking for.
 
Back
Top