strange date problem

Results 1 to 3 of 3

Thread: strange date problem

  1. #1
    Join Date
    Dec 1969

    Default strange date problem

    Is there any known problems with updating dates in a database,<BR>using the following sql,<BR><BR>Sql = "update forum2 set Date_Post = #" & now() & "# where ID = " & Request.Form("id")<BR><BR>when the following script updates the database, it seems to change the date format from dd/mm/yy to mm/dd/yy...<BR><BR>I want the date format in dd/mm/yy.<BR><BR>any help is much appreciated<BR><BR>DM

  2. #2
    Join Date
    Dec 1969

    Default RE: strange date problem

    I don&#039t know if it&#039s the &#039official&#039 solution but I use the following to get the date in UK style:<BR><BR>yourdate = day(date) & "/" & month(date) & "/" & year(date)<BR><BR>Also check that your DB field has the correct format set

  3. #3
    Join Date
    Dec 1969

    Default Just accept the bad news, then all is clear!

    The internet runs in U.S. Date format, so the best way to deal with the problem is to accept the fact! I too have this problem, and simply convert all form entered dates into mm/dd/yy format and accept that the Now() and Date functions will generate a U.S. date.<BR><BR> When I display dates I ensure I use the long date format with <BR>Response.Write(FormatDateTime(MyDate,vbLongDat e))

Posting Permissions

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