form to db date problem

Results 1 to 3 of 3

Thread: form to db date problem

  1. #1
    Join Date
    Dec 1969

    Default form to db date problem

    I am trying to pass a date from a form to an SQL database. Say I enter today&#039;s date as 10/07/2002 it is writing to the db as 07/10/2002.<BR><BR>I am using the following in an include at the top of the page along with the dbconnect info:<BR>original = setLocale("en-gb")<BR><BR>Is this likely to affect it?<BR>Can I format the date in any way so that it doesn&#039;t reverse the months and days?<BR><BR>Lloyd

  2. #2
    Join Date
    Dec 1969
    Indianapolis, IN

    Default RE: form to db date problem

    If you set the locale to Great Britain ("en-gb"), then it will use that date format. You can either ditch that locale stuff altogether or else use ("en-us") for the U.S. date format. (At least I think that&#039;s our locale abbreviation.)

  3. #3
    Join Date
    Dec 1969


    There is a whole category dedicated to Date/Time issues.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts