Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Date in US format
Ian Summers
#1 Posted : Wednesday, March 14, 2007 12:10:07 PM(UTC)
Groups: Member
Joined: 3/14/2007(UTC)
Posts: 1
Location: Calgary, AB

Hi there,
When running Cassini, it seems to be using the date format DD/MM/YYYY hh:mm which is causing me troubles when adding certain dates into a SQL 2005 database.

How do you set it use the US date format MM/DD/YYYY hh:mm ?

I tried adding:
<globalization
culture="en-US"
uiCulture="en-US" />
</system.web>

into the file 'UltiDevCassinWebServer2.exe.config' and restarted the service but no luck.

I get around it by programmatically formatting the date that is to be stored.

Thanks in advance
Ian S.
Ultidev Team
#2 Posted : Wednesday, March 14, 2007 6:06:41 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hello, Ian.

Do we understand you correctly that you pass date value as string to SQL Server query or stored proc? If you pass it as a SQL parameter then you don't need to convert it to string - you can just pass DateTime. If you are building SQL query dynamically, then programmatic approach you've been using is probably the right one. Although you may also try to change globalization settings in your application's web.config instead of Cassini's.

Also, could you please tell us if this problem is Cassini-specific? Please let us know if you ran your application under IIS and it had different behavior there compared to our Cassini?

Please let us know if this information has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.