K
Kwong
I am using frontpage with access to save some data, including dates. I
need the date to be saved in the format dd/MM/yyyy (and all
calculations and queries to be compatible) so I used the FormatDateTime
function. I changed my regional settings such that the short date is
dd/MM/yyyy but, it still uses the m/d/yyyy for an unknown reason.
on one page, i have the user use three drop down menus to input day,
month, and year. these are sent to another page - and below is what I
have coded. Please let me know what I am doing wrong.
Thank you.
<%
dim myDate(2)
dim strQty
dim strDate, stringDate
strQty = request("Qty")
myDate(0) = request("Date")
myDate(1) = request("Month")
myDate(2) = request("Year")
strDate = Join(myDate, "-")
strDate = FormatDateTime(strDate, 2)
stringDate = FormatDateTime(strDate, 1)
response.write "<p>date is: --> : " &strDate& " "
if IsDate(strDate) = FALSE then
response.write "<p>The date " & strDate & " does not exist <p> Please
enter a new date.<p>"
response.write "<p>Return to <a href='date.htm'>Form</a> or click
back<p>"
else
response.write "<p>all is good <p>"
response.write "<p>i repeat, the date entered is: " & stringDate & " "
session("Date") = strDate
session("Qty") = strQty
response.write "<p>qty entered is: " &strQty& " "
end if
response.write "<p><a href='index.htm'>Homepage</a></p>"
%>
need the date to be saved in the format dd/MM/yyyy (and all
calculations and queries to be compatible) so I used the FormatDateTime
function. I changed my regional settings such that the short date is
dd/MM/yyyy but, it still uses the m/d/yyyy for an unknown reason.
on one page, i have the user use three drop down menus to input day,
month, and year. these are sent to another page - and below is what I
have coded. Please let me know what I am doing wrong.
Thank you.
<%
dim myDate(2)
dim strQty
dim strDate, stringDate
strQty = request("Qty")
myDate(0) = request("Date")
myDate(1) = request("Month")
myDate(2) = request("Year")
strDate = Join(myDate, "-")
strDate = FormatDateTime(strDate, 2)
stringDate = FormatDateTime(strDate, 1)
response.write "<p>date is: --> : " &strDate& " "
if IsDate(strDate) = FALSE then
response.write "<p>The date " & strDate & " does not exist <p> Please
enter a new date.<p>"
response.write "<p>Return to <a href='date.htm'>Form</a> or click
back<p>"
else
response.write "<p>all is good <p>"
response.write "<p>i repeat, the date entered is: " & stringDate & " "
session("Date") = strDate
session("Qty") = strQty
response.write "<p>qty entered is: " &strQty& " "
end if
response.write "<p><a href='index.htm'>Homepage</a></p>"
%>