DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Weired behaviour of SQL

  1. #1
    Join Date
    Sep 2000
    Posts
    41
    HI,

    I have a date field in my database. It is called Actual_Start_time.

    Actual_start_time has a value of 10/3/2002 5:21:48 AM.

    When I am doing a select Actual_Start_Time it is giving perfect data. But when I am doing a TO_CHAR(Actual_start_time, 'DD-MON-YYYY HH24:MM:SS') it is giving me 03-OCT-2002 05:10:48.

    As you can see, the time component is reduced by 11 minutes. This is happening for all the records. I am totally confused with this. Can anyone tell me why this is happening and how to solve this problem.

    Thank you,

    Amit

  2. #2
    Join Date
    Jul 2001
    Location
    Slovenia
    Posts
    422
    Because MM is format descriptor for month : 10 = October.
    Use MI for minutes.

Posting Permissions

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


Click Here to Expand Forum to Full Width