Link to home
Start Free TrialLog in
Avatar of dkmarsh
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 ?

ASKER CERTIFIED SOLUTION
Avatar of GiftsonDJohn
GiftsonDJohn
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SyferB
SyferB

Yes you can.
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>
Yes. But it will display in NZ time zone for all the zones (including US)