• Lucid Dreaming - Dream Views




    Results 1 to 6 of 6
    1. #1
      Member Rakjavik's Avatar
      Join Date
      Nov 2007
      Gender
      Location
      USA
      Posts
      462
      Likes
      7

      Problem with times with Oracle Query

      Hey all. So I'm running this query in SQL developer on an Oracle DB.

      "select TO_CHAR(sysdate,'HH:MM:SS') from dual"

      The problem is, it's returning the hour correctly, but the minute is always 09. If it just keep running it, the seconds will tick up to 59, but the minute always stays at 09. When the hour rolls over, the hour goes to the next one. Example at 8:30, it returns 8:09:SS, at 9:45 it will return 9:09:SS ect.

      Anyone know what's up with this behavior? I've done the query using SQL developer, and just doing straight java code with the same results.

    2. #2
      The First Lightbender Achievements:
      Tagger First Class Made lots of Friends on DV Referrer Bronze 5000 Hall Points Veteran First Class
      IAmCoder's Avatar
      Join Date
      Dec 2010
      Location
      Down Under
      Posts
      1,078
      Likes
      564
      Dude, the month is 09! Try mm.

    3. #3
      Member Rakjavik's Avatar
      Join Date
      Nov 2007
      Gender
      Location
      USA
      Posts
      462
      Likes
      7
      Ahh yes. I love feeling stupid. Actually since it was Oracle (not sql) had to change it to MI. Thanks coder

    4. #4
      The First Lightbender Achievements:
      Tagger First Class Made lots of Friends on DV Referrer Bronze 5000 Hall Points Veteran First Class
      IAmCoder's Avatar
      Join Date
      Dec 2010
      Location
      Down Under
      Posts
      1,078
      Likes
      564
      Sure. I will be here all week.

    5. #5
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      mm is minute, MM is month. SS isn't seconds either, it's ss.

    6. #6
      Member Achievements:
      1 year registered Veteran First Class 5000 Hall Points

      Join Date
      Sep 2004
      Gender
      Location
      Seattle, WA
      Posts
      2,503
      Likes
      217
      Yeah, MI is minute. SS(capital) actually does give you seconds. I usually to 'YYYY-MM-DD HH24:MI:SS' though would be easier to just set that as the default then you never need to format to_char by hand.

    Similar Threads

    1. Query To All: Have you Met yourself in a dream?
      By Syntex in forum General Dream Discussion
      Replies: 16
      Last Post: 06-04-2013, 02:19 AM
    2. Are my unusual sleeping times a problem?
      By SwL in forum Wake Initiated Lucid Dreams (WILD)
      Replies: 1
      Last Post: 10-13-2009, 12:48 PM
    3. a query...
      By NZMatt in forum Introduction Zone
      Replies: 4
      Last Post: 10-21-2005, 09:03 PM
    4. A small query.
      By Danski in forum Attaining Lucidity
      Replies: 3
      Last Post: 08-01-2005, 12:25 AM

    Bookmarks

    Posting Permissions

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