dkmarsh
asked on
ASP.NET website & SQL Server - how to set local date / time and date format
Hi. I am hosting an ASP.NET website and SQL Server database in USA.
I am accessing this from New Zealand and want the system to display New Zealand local date / time and also date format dd/mm/yy instead of mm/dd/yy.
Is there a setting for web.config or something I can set so the site uses local date / time ?
I am accessing this from New Zealand and want the system to display New Zealand local date / time and also date format dd/mm/yy instead of mm/dd/yy.
Is there a setting for web.config or something I can set so the site uses local date / time ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes. But it will display in NZ time zone for all the zones (including US)
Add the following to your web config
<configuration>
<system.web>
<globalization
fileEncoding="utf-8"
requestEncoding="utf-8"
responseEncoding="utf-8"
culture="en-NZ"
uiCulture="en-NZ" />
</system.web>
</configuration>