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.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Print and print preview file on the website without using the File - Print on the IE
•  Re: ASP.NET web controls
•  Re: JavaSript Problem In Mac Safari Browser
•  Re: DHTML div positionning Problem
•  Convert script to NS6 compatible - Please Help!
•  Print .doc file from the website using System.Diagnostics.Process
•  Re: Fullscreen code
•  Re: iframe targeting
•  Excel n ASP


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005