Results 1 to 4 of 4

Thread: type date

  1. #1
    Join Date
    Aug 2003
    Location
    Vicenza(I)
    Posts
    21

    Red face Unanswered: type date

    Hello i've another problem with the type date.
    What's the syntax of insert in this type?
    I've the table:
    film wit the column data_catalogo date and I want to insert a value but I don't say how.
    Thank You, Elisa

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: type date

    Originally posted by trilly
    Hello i've another problem with the type date.
    What's the syntax of insert in this type?
    I've the table:
    film wit the column data_catalogo date and I want to insert a value but I don't say how.
    Thank You, Elisa
    Which DBMS? Oracle, SQL Server, Access, ...?

  3. #3
    Join Date
    Aug 2003
    Location
    Vicenza(I)
    Posts
    21

    Re: type date

    Originally posted by andrewst
    Which DBMS? Oracle, SQL Server, Access, ...?
    Oracle 9i,
    thank you.

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: type date

    Originally posted by trilly
    Oracle 9i,
    thank you.
    In that case, you need to use the TO_DATE function with a VARCHAR2 date value and a format mask, e.g.:

    insert into mytable( date_col ) values ( TO_DATE('01-SEP-2003','DD-MON-YYYY') );

    insert into mytable( date_col ) values ( TO_DATE('01/09/2003','DD/MM/YYYY') );

    insert into mytable( date_col ) values ( TO_DATE('2003/09/01 16:42:00','YYYY/MM/DD HH24:MIS') );

Posting Permissions

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