October 7, 2009 at 3:28 pm
My question is not about ASP Pages is because a system was using Access database and when i past it to sql database i get in my asp application the date format like mm/dd/yyyy but i get 28/12/2009(month 28?) in the sql database the value is 2009/12/28, well the result i need is mm/dd/yyyy like 12/28/2009
Note: When i get the values from the access database i get 12/28/2009 that its ok
Please Help! =(
October 7, 2009 at 3:43 pm
Sounds like you need to check the regional settings on the client. This isn't a SQL Server issue.
October 7, 2009 at 3:57 pm
You could try to force the output from SQL Server to U.S. standard format using CONVERT(CHAR(10),YourDateValue,101).
Edit: ... but this won't be a date format anymore. But it's possible that your app will do an implicit conversion back to a date format, if required.
October 8, 2009 at 6:06 pm
The original post seems confusing. Are you viewing the data in an Access front end or are you viewing it via an a ASP.NET page? The relationship between Access, ASP.NET and SQLServer isn't clear to me.
If you're linking an Access front end to SQLServer, what is the format of the dates when you open the linked table directly in Access?
If you're viewing it via an ASP.NET page, here's one way to format the value.
#Eval("PhoneTemporaryInformationExpirationDate", "{0:dddd, MMMM d, yyyy}")
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply