Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    53

    Unanswered: cannot change date format?

    ok, i have a date datatype of vStrTime, e.g:
    vStrTime1 date;
    vStrTime date;

    vStrTime := '13-AUG-04';

    i wanna change the format to 'YYYY-MM-DD HH24:MIS', so i put this code in:

    vStrTime1 := to_date(to_char(vStrTime,'YYYY-MM-DD HH24:MIS'),'YYYY-MM-DD HH24:
    MIS');

    but the vStrTime1 still returns a value of ''13-AUG-04'
    can u guys tell me where went wrong? isnit supposed to return a date format of 'YYYY-MM-SS HH24:MIS'?
    thanks

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    the to_date() funtion applies to the input of a date value.

    Select to_char(vStrTime,'YYYY-MM-DD HH24:MIS') from table;
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Nov 2003
    Posts
    53
    ok solve my problem! thanx r123456!!

Posting Permissions

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