Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2011

    Unanswered: Convert DateTime problem

    Version: Pervasive 10.30

    Problem: I need to change DateTime column values from mm/dd/yyyy into dd/mm/yyyy

    update with set=2011/01/01 is working good

    1 step was to create 2nd table and copy all data, in 2nd step i want to convert exisiting date format into new one. I am using this statment i found somewhere in this forum:

    update test
    set data= select convert(day(datac),SQL_CHAR) + '/' + convert(month(datac),SQL_CHAR) + '/' + convert

    (year(datac),SQL_CHAR) from Table where id=1

    Error:[LNA][Pervasive][ODBC Engine Interface]Invalid date, time or timestamp value.

    Can someone point me where i made errors?

  2. #2
    Join Date
    Dec 2001
    Provided Answers: 6
    Is the data type in the table actually a Date or DateTime? If it is, the format will have to be 'yyyy-mm-dd'. You cannot store it in the field any other way.

    What exactly are you trying to accomplish with the conversion?
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    I do not answer questions by email. Please post on the forum.

Posting Permissions

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