codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  date/time  runsh at 03:53 on Wednesday, November 24, 2004
 

anyone can help with this date and time problem. when I enter date in a form, shows up in this formate
2004/11/23 07:38:26 È.Ù
Is there a way to change it to US. I deleted from databse access and reentered it but still showing up like this.

access.mdb
date: text

thanks

  Re: date/time  tgreer at 04:05 on Wednesday, November 24, 2004
 

There is a lot of ground to cover here.

Your default "locale" isn't set to US English. Maybe you don't want it to be, you didn't say.

But, you can change the locale using the DateTime.Format method, in conjunction with the System.Globalization namespace:


<%=DateTime.Now.ToString("f")%>
<%=DateTime.Now.ToString("f", new System.Globalization.CultureInfo("us=US"))%>


I think that gets you U.S. formatted dates.

You can also make a particular web application default to a locale by making the proper entries in the web.config file.

That should be enough to get you going. If you need more help, ask me or search Google with "ASP.NET Locale".

As always, support CodeToad by clicking on some of the ads. If you found my post helpful, then please visit MY site and click some of the ads THERE.



  Re: date/time  runsh at 04:26 on Wednesday, November 24, 2004
 

thanks for quick response.
thats what I was looking for.

  Re: date/time  tgreer at 04:38 on Wednesday, November 24, 2004
 

Glad I could help.




© Copyright codetoad.com 2001-2005