|
 |
asp_web_howto thread: Re: SQL & IIS Server Time Stamp
Message #1 by william.sze@s... on Wed, 12 Jun 2002 08:48:43 -0400
|
|
Yes, I did. Both local and system locale are set to English(United States).
"Ken Schaefer"
<ken@a... To: "ASP Web HowTo" <asp_web_howto@p...>
tic.com> cc:
Subject: [asp_web_howto] Re: SQL & IIS Server Time Stamp
06/12/02 02:34
AM
Please respond
to "ASP Web
HowTo"
Did you press the button that is labelled "Set Default"?
You need to press this button, then choose the appropariate default locale,
otherwise you are only changing your own Regional Settings. The
IUSR_<machinename> account will continue to use the UK English settings.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <william.sze@s...>
Subject: [asp_web_howto] Re: SQL & IIS Server Time Stamp
:
: Ken,
:
: I checked the system setting as suggested from the link to set locale to
: English (United States) and short day format in Date tab to MM/DD/YYYY.
:
: However when I run the code
: response.write Date( )
:
: , it still gives me UK format: 11/06/2002.
:
: Please help.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 12 Jun 2002 16:34:38 +1000
|
|
Did you press the button that is labelled "Set Default"?
You need to press this button, then choose the appropariate default locale,
otherwise you are only changing your own Regional Settings. The
IUSR_<machinename> account will continue to use the UK English settings.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <william.sze@s...>
Subject: [asp_web_howto] Re: SQL & IIS Server Time Stamp
:
: Ken,
:
: I checked the system setting as suggested from the link to set locale to
: English (United States) and short day format in Date tab to MM/DD/YYYY.
:
: However when I run the code
: response.write Date( )
:
: , it still gives me UK format: 11/06/2002.
:
: Please help.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by william.sze@s... on Tue, 11 Jun 2002 14:24:21 -0400
|
|
Hi Ron,
The function works fine to show timestamp from system. However, I have
other page that allows user to type in the date.
I'm able to use the function to show default today's date in the input box
as US format. However, that page that allows user to click on calendar
hyperlink to display calender, as in many popular web sites. In that
calendar.asp, there are a lot of CDate function. A value of '6/11/2002' in
the box will display Nov calendar instead of Jun. When I try to jump to
next month by clicking the arrow on the calendar, it display Dec instead of
Jul.
I think I'll need to modify the code using your function in calendar.asp
in order to display the correct calendar.
Any other method that I can keep the original calendar.asp but still able
to display the correct calendar pop up window.
Thanks
William
"Drew, Ron"
<RDrew@B... To: "ASP Web HowTo" <asp_web_howto@p...>
com> cc:
Subject: [asp_web_howto] Re: SQL & IIS Server Time Stamp
06/11/02 01:56
PM
Please respond
to "ASP Web
HowTo"
Long way but should work....
function mydatestyle(strDate)
dim strmonth
dim strday
dim stryear
strmonth = month(strdate)
strday = day(strdate)
stryear = year(strdate)
mydatestyle = strday & "/" & strmonth & "/" & stryear
end function
call your function like:
Dim strDate1
strDate1 = Date()
response.write mydatesyle(strDate1)
-----Original Message-----
From: william.sze@s... [mailto:william.sze@s...]
Sent: Tuesday, June 11, 2002 1:16 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: SQL & IIS Server Time Stamp
Ken,
I checked the system setting as suggested from the link to set locale to
English (United States) and short day format in Date tab to MM/DD/YYYY.
However when I run the code
response.write Date( )
, it still gives me UK format: 11/06/2002.
Please help.
Thanks
William
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <william.sze@s...>
Subject: [asp_web_howto] SQL & IIS Server Time Stamp
: From query analyser, I can see that all my date time records are in US
: format.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No they are not. As I've explained many times on the list, date/times
are stored as *numbers*. For example, for a smalldatetime field, a value
of 1 would indicate 1 day from an arbitrary starting date (1/1/1900), 2
would indicate 2 days.
1.5 would indicate 1 day, and 12 hours. 1.75 would indicate 1 day and 18
hours
How QA (or EM) *displays* this to you is dependant on the Regional
Settings for the logged on user.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: However, when I display the data using my asp page, it shows as UK
: format. My PC is set in US format. Even I hardcode LCID=1033, it
doesn't
: help.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
But IIS doesn't run in the context of the logged on user. Hence the
Regional Settings might be different to yours.
www.adopenstatic.com/faq/systemdateformat.asp to change the default
settings for other users.
Cheers
Ken
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #4 by "Drew, Ron" <RDrew@B...> on Tue, 11 Jun 2002 13:56:57 -0400
|
|
Long way but should work....
function mydatestyle(strDate)
dim strmonth
dim strday
dim stryear
strmonth =3D month(strdate)
strday =3D day(strdate)
stryear =3D year(strdate)
mydatestyle =3D strday & "/" & strmonth & "/" & stryear
end function
call your function like:
Dim strDate1
strDate1 =3D Date()
response.write mydatesyle(strDate1)
-----Original Message-----
From: william.sze@s... [mailto:william.sze@s...]
Sent: Tuesday, June 11, 2002 1:16 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: SQL & IIS Server Time Stamp
Ken,
I checked the system setting as suggested from the link to set locale to
English (United States) and short day format in Date tab to MM/DD/YYYY.
However when I run the code
response.write Date( )
, it still gives me UK format: 11/06/2002.
Please help.
Thanks
William
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <william.sze@s...>
Subject: [asp_web_howto] SQL & IIS Server Time Stamp
: From query analyser, I can see that all my date time records are in US
: format.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No they are not. As I've explained many times on the list, date/times
are stored as *numbers*. For example, for a smalldatetime field, a value
of 1 would indicate 1 day from an arbitrary starting date (1/1/1900), 2
would indicate 2 days.
1.5 would indicate 1 day, and 12 hours. 1.75 would indicate 1 day and 18
hours
How QA (or EM) *displays* this to you is dependant on the Regional
Settings for the logged on user.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: However, when I display the data using my asp page, it shows as UK
: format. My PC is set in US format. Even I hardcode LCID=3D1033, it
doesn't
: help.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
But IIS doesn't run in the context of the logged on user. Hence the
Regional Settings might be different to yours.
www.adopenstatic.com/faq/systemdateformat.asp to change the default
settings for other users.
Cheers
Ken
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
Message #5 by william.sze@s... on Tue, 11 Jun 2002 13:16:28 -0400
|
|
Ken,
I checked the system setting as suggested from the link to set locale to
English (United States) and short day format in Date tab to MM/DD/YYYY.
However when I run the code
response.write Date( )
, it still gives me UK format: 11/06/2002.
Please help.
Thanks
William
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <william.sze@s...>
Subject: [asp_web_howto] SQL & IIS Server Time Stamp
: From query analyser, I can see that all my date time records are in US
: format.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No they are not. As I've explained many times on the list, date/times are
stored as *numbers*. For example, for a smalldatetime field, a value of 1
would indicate 1 day from an arbitrary starting date (1/1/1900), 2 would
indicate 2 days.
1.5 would indicate 1 day, and 12 hours. 1.75 would indicate 1 day and 18
hours
How QA (or EM) *displays* this to you is dependant on the Regional Settings
for the logged on user.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: However, when I display the data using my asp page, it shows as UK
: format. My PC is set in US format. Even I hardcode LCID=1033, it doesn't
: help.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
But IIS doesn't run in the context of the logged on user. Hence the
Regional
Settings might be different to yours.
www.adopenstatic.com/faq/systemdateformat.asp to change the default
settings
for other users.
Cheers
Ken
Message #6 by "Ken Schaefer" <ken@a...> on Tue, 11 Jun 2002 14:17:49 +1000
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <william.sze@s...>
Subject: [asp_web_howto] SQL & IIS Server Time Stamp
: From query analyser, I can see that all my date time records are in US
: format.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No they are not. As I've explained many times on the list, date/times are
stored as *numbers*. For example, for a smalldatetime field, a value of 1
would indicate 1 day from an arbitrary starting date (1/1/1900), 2 would
indicate 2 days.
1.5 would indicate 1 day, and 12 hours. 1.75 would indicate 1 day and 18
hours
How QA (or EM) *displays* this to you is dependant on the Regional Settings
for the logged on user.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: However, when I display the data using my asp page, it shows as UK
: format. My PC is set in US format. Even I hardcode LCID=1033, it doesn't
: help.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
But IIS doesn't run in the context of the logged on user. Hence the Regional
Settings might be different to yours.
www.adopenstatic.com/faq/systemdateformat.asp to change the default settings
for other users.
Cheers
Ken
Message #7 by william.sze@s... on Fri, 7 Jun 2002 14:46:22 -0400
|
|
Hi,
I have IIS and SQL 2000 server installed in one machine.
From query analyser, I can see that all my date time records are in US
format. However, when I display the data using my asp page, it shows as UK
format. My PC is set in US format. Even I hardcode LCID=1033, it doesn't
help.
You know what, it showed US date format before but after one weekend it
changed to UK format for the same source code in asp.
Would it be a problem on IIS settings?
Please help.
Thanks
William
|
|
 |