access_asp thread: asp "dates" in italy urgent please
Message #1 by richhern35@h... on Thu, 23 May 2002 11:50:04
|
|
I created some asp pages in which i calculate the total price for a
camping reservation system using the beginning and ending date supplied by
a client.
I used my computer at home in the usa to create the asp code. The code is
working great. However, right now i am planning to deploy this web site to
an italian server. They are running all the software in italian version
(windows2000,iis5.0 etc.)
In my form i told my users to use the DD/MM/YYYY european format to enter
the beginning date and ending date for the calculation.
Right now i am doing some comparisons and i am getting some unexpecting
results.
Does any one know if there is a problem with dates using the italian
version dd-mm-yyyy european instead of mm-dd-yyyy?.
All the software i used is the italian version so i thought that the
system would take care of that problem.
Thank you.
Ricardo Hernandez
Message #2 by "Ian Maley" <imaley@h...> on Thu, 23 May 2002 08:14:50 -0400
|
|
Hi Ricardo:
for actions against the database you may have to convert your dates to
mm/dd/yy format - I had the same problem with a contract in the UK - so I
came up with a fixdate() function to convert dates from dd/mm/yy to mm/dd/yy
format and that did it.
Good luck!
Ian Maley
_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
Message #3 by "Ian Maley" <imaley@h...> on Thu, 23 May 2002 08:27:10 -0400
|
|
Ricardo:
here's the fixdate()function I used to convert dd/mm/yy to mm/dd/yy - to
save you writing it:
'changes date format to dd/mm/yyyy
Function FixDate(vDate)
vMonth = Month(vDate)
if Cint(vMonth) < 10 then
vMonth = "0" & vMonth
end if
vDay = Day(vDate)
if Cint(vDay) < 10 then
vDay = "0" & vDay
end if
vYear = Year(vDate)
FixDate = vDay & "/" & vMonth & "/" & vYear
End function
Regards,
Ian Maley
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
Message #4 by "Ian Maley" <imaley@h...> on Thu, 23 May 2002 08:33:40 -0400
|
|
Ricardo:
the fixdate() function I sent you went the opposite way from you want,
sorry, it converts from mm/dd/yy to dd/mm/yy - the last thing you want!
But you can easily modify it to convert from dd/mm/yy to mm/dd/yy. Apply
this to all dates used against the database.
Ian
_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
Message #5 by richhern35@h... on Thu, 23 May 2002 17:53:56
|
|
Ian Thank you for your advice
I am planning to convert my european dates to american format dates to see
if it fix the problem thank you.
Sincerely,
Ricardo Hernandez
_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
Message #6 by "Ken Schaefer" <ken@a...> on Mon, 27 May 2002 12:09:54 +1000
|
|
Some help:
www.adopenstatic.com/faq/dateswithaccess.asp
www.adopenstatic.com/faq/systemdateformat.asp
www.adopenstatic.com/resources/code/formatdate.asp
Dealing with dates & Access is a common problem that new developers run into
when you want to use non-US dates. The above will tell you what you need to
do.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <richhern35@h...>
Subject: [access_asp] asp "dates" in italy urgent please
: I created some asp pages in which i calculate the total price for a
: camping reservation system using the beginning and ending date supplied by
: a client.
: I used my computer at home in the usa to create the asp code. The code is
: working great. However, right now i am planning to deploy this web site to
: an italian server. They are running all the software in italian version
: (windows2000,iis5.0 etc.)
: In my form i told my users to use the DD/MM/YYYY european format to enter
: the beginning date and ending date for the calculation.
:
: Right now i am doing some comparisons and i am getting some unexpecting
: results.
:
: Does any one know if there is a problem with dates using the italian
: version dd-mm-yyyy european instead of mm-dd-yyyy?.
: All the software i used is the italian version so i thought that the
: system would take care of that problem.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|