Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Location
    Ontario, Canada
    Posts
    2

    Unanswered: Sql DateSerial problems

    Hello All!

    I am using SQL to format the dates in my MS Access tables from YYMMDD to MMDDYYYY. However there is a problem. When converting a date value of 880105, my DateSerial returns 09/05/154. Also, when converting 000000, DateSerial returns 11/30/1999, when it should return 1/1/00, right?

    Here is my SQL code:

    UPDATE ICVEND SET ICVEND.LastDateRcvd = DateSerial(Left([LastDateRcvd],2),Mid([LastDateRcvd],2,3),Right([LastDateRcvd],2));

    What is the problem?

    Thanks

    Dave

  2. #2
    Join Date
    Sep 2003
    Location
    malaysia
    Posts
    2

    Re: Sql DateSerial problems

    Originally posted by daver676
    Hello All!

    I am using SQL to format the dates in my MS Access tables from YYMMDD to MMDDYYYY. However there is a problem. When converting a date value of 880105, my DateSerial returns 09/05/154. Also, when converting 000000, DateSerial returns 11/30/1999, when it should return 1/1/00, right?

    Here is my SQL code:

    UPDATE ICVEND SET ICVEND.LastDateRcvd = DateSerial(Left([LastDateRcvd],2),Mid([LastDateRcvd],2,3),Right([LastDateRcvd],2));

    What is the problem?

    Thanks

    Dave



    hi...

    if i'm not mistaken ..try this

    select format(LastDateRcvd,'mmddyyyy') from icvend

    tq

Posting Permissions

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