Hi Kwong,
Interesting question. You seem to have done your homework. Format 1 is
vbLongDate, which should use your computer's regional settings. Format 2 is
vbShortDate, which should also use your computer's regional settings. My
first question would be, where are you requesting this page from? If the ASP
page is on your local computer, it should display the date as you expect. On
the other hand, if the ASP page is on a remote computer, it will use that
computer's regional settings. Once the date has been formatted, it is a
string in an HTML page, and it will not "translate" to the browser
computer's regional settings.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Kwong" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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>"
>
> %>
>
|