Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert.ToDateTime

Status
Not open for further replies.

lfc77

Programmer
Aug 12, 2003
218
GB
I've been using this code to get the date in the format dd/mm/yyyy with Culture="en-GB":

DateFrom = Convert.ToDateTime(DateFrom.ToString("d"));

Now I need to put the date in US format, so I've changed my Culture to "en-US", but the line of code no longer works, instead of 10/28/2003, I get 10/28/2003 12:00:00AM.

Can anybody help me out with this?



Thanks,

lfc77
 
How did you change your culture?
Did you assign a new value to Thread.CurrentCulture?

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top