473,385 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ASP.Net not showing Correct System Short Date format ?

I have deployed my ASP.Net Application on Windows Server 2000, Service Pack
4, when I run my Application and shows today's date with
system.date.today.ToShortDateString, it shows in the format m/d/yyyy while
in my Regional Settings, I have defined the format as dd/MM/yyyy.

If I run the same Application on my Laptop with Windows XP Pro, it displays
the correct date format, any idea please ?

Best Regards,

Luqman

Jul 2 '07 #1
3 3177
Hi there,

Server has got different locale setting. You can force ASP.NET worker
process to use different locale by changing <globalizationelement in the
web.config / machine.config file:

<system.web>
.... other settings
<globalization culture="en-GB"/>
.... other settings
</system.web>

hope this helps

--
Milosz
"Luqman" wrote:
I have deployed my ASP.Net Application on Windows Server 2000, Service Pack
4, when I run my Application and shows today's date with
system.date.today.ToShortDateString, it shows in the format m/d/yyyy while
in my Regional Settings, I have defined the format as dd/MM/yyyy.

If I run the same Application on my Laptop with Windows XP Pro, it displays
the correct date format, any idea please ?

Best Regards,

Luqman

Jul 2 '07 #2
An ASPX page runs on the server so it uses the server settings not your
workstation settings.

You could use the globalization section in the web.config file to tell
ASP.NET which country should be used (rather than messing with system wide
server settings. See :
http://msdn2.microsoft.com/en-us/library/hy4kkhe0.aspx
"Luqman" <pe*******@cyber.net.pka écrit dans le message de news:
OL*************@TK2MSFTNGP06.phx.gbl...
>I have deployed my ASP.Net Application on Windows Server 2000, Service Pack
4, when I run my Application and shows today's date with
system.date.today.ToShortDateString, it shows in the format m/d/yyyy while
in my Regional Settings, I have defined the format as dd/MM/yyyy.

If I run the same Application on my Laptop with Windows XP Pro, it
displays
the correct date format, any idea please ?

Best Regards,

Luqman

Jul 2 '07 #3
Hi,
Thanks V.Much, it resolved my problem.

Best Regards,

Luqman
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plwrote in message
news:45**********************************@microsof t.com...
Hi there,

Server has got different locale setting. You can force ASP.NET worker
process to use different locale by changing <globalizationelement in the
web.config / machine.config file:

<system.web>
... other settings
<globalization culture="en-GB"/>
... other settings
</system.web>

hope this helps

--
Milosz
"Luqman" wrote:
I have deployed my ASP.Net Application on Windows Server 2000, Service
Pack
4, when I run my Application and shows today's date with
system.date.today.ToShortDateString, it shows in the format m/d/yyyy
while
in my Regional Settings, I have defined the format as dd/MM/yyyy.

If I run the same Application on my Laptop with Windows XP Pro, it
displays
the correct date format, any idea please ?

Best Regards,

Luqman



Jul 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ST | last post by:
Hello, I will be posting 2 errors that I just can't seem to figure out (I'll put them in different posts). I have looked all over the internet, and I still can't figure these out! This webapp was...
1
by: kgatchell2001 | last post by:
Hi, I am a beginner working on a database to manage clients, payroll, station assignments, etc. I have created a query which calculates age based on subtracting the date of birth from the current...
5
by: Indrani | last post by:
I am working on a C# console application. How can we set the system date in C#. Rgds, Indrani
2
by: TerryW | last post by:
I am using a system.windows.forms.datagrid and i set it's data source to a system.data.datatable which has a column that's dataType is system.dateTime. When I try to enter minutes and seconds...
3
by: Henry Lee | last post by:
hi , all In ASP2.0 , the date object always showing like "3/27/2006 12:00:00 AM" How to remove "12:00:00 AM" and only make it shows "3/27/2006" ? Thanks very much Henry
6
by: ABC | last post by:
Is there any function return the short date format on the regional and Language Options under control panel?
2
by: savigliano | last post by:
hello, i am doing a date comparation and i have reallize that the data i have in my database (general date format) it is causing me problems, and because i don´t need the time data i would like to...
4
by: john | last post by:
I have an unbound field in which I would like to show january 1 of the current year like this 01-01-2007. I tried this code but it doesn't work: =dateserial(Year(date()),1,1) Can someone help me...
3
by: Matt Brown - identify | last post by:
Hello, I'm trying to figure out a method to look up by a range of dates, entries in a database. The format of the date in the database is "M\D \yyyy HH:MM:SS". What i need to do is take the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.