Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8814145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:02:08+00:00 2026-06-14T04:02:08+00:00

Bit stuck here. Say I run the following SQL query: select to_char(sysdate, ‘DD/MON/YY’) ||

  • 0

Bit stuck here. Say I run the following SQL query:

select to_char(sysdate, 'DD/MON/YY') || ' 15:32:00' from dual;

The result gives me this:

08/NOV/12 15:32:00

Now I want to take that result and use it in a to_date function (long story as to why, but I’ll go into detail in a sec):

select to_date((to_char(sysdate, 'DD/MON/YY') || ' 15:32:00'), 'DD/MON/YY HH24:MI:SS') from dual;

I was expecting the result to be the same as the previous one, except it isn’t. Instead it gives me this:

08/NOV/12

Question is this: Is there a way I can use a concatenation of a to_char(sysdate, ‘DD/MON/YY’) and any combo of HH24:MI:SS in a to_date?

Additional detail that may or may not be of any additional use:
Reason I need to do this is because I was provided a query that has a table with an SLA time. The format is just a time in HH24:MI, however it’s not a DATETIME type (I suspect it’s a VARCHAR, but can’t tell for sure as it’s likely a view or function of some sort that I cannot dissect. Partially due to me not knowing how to and partially to me not having the necessary access due to my DB user.

EDIT: On reading the above again I realized I left out some additional detail (though this does not relate to my question at all I think):
I want to take today’s date (DD/MON/YY), combine that with the SLA time of HH:MI, combine that with ‘:00’ for :SS, convert the whole thing to a date, then do a comparison between the resultant abomination and the finish time for each row returned. If the finish time is bigger/ newer/ later than my combination-and-conversion-deluxe, then return something specific, in not, return something like “All OK”. Not sure if that makes sense or not, but in summary, I want to get something that I can use to compare to another DATETIME type, so I think I need to somehow get the SLA time converted to a DATETIME type as well.

Any help on this will be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:02:10+00:00Added an answer on June 14, 2026 at 4:02 am

    the output you see is converted to a char format. this is dictated by the NLS_DATE_FORMAT setting. internally, the date will still have the time format associated. so do this to see it:

    SQL> select sysdate from dual;
    
    SYSDATE
    ---------
    08-NOV-12
    
    SQL> alter session set nls_date_format='dd/MON/yy hh24:mi:ss';
    
    Session altered.
    
    SQL> select sysdate from dual;
    
    SYSDATE
    ------------------
    08/NOV/12 11:41:46
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a bit of stuck here. I am trying to POST from firefox's poster
I was following this tutorial, bit stuck here: This code doesn't compile, and the
I am a bit stuck here and can't think further. public struct CandidateDetail {
I am little bit stuck here .. I have a datatable as _ Dim
I am a bit stuck on how I should model this out. Here is
Ok guys im a bit stuck here. I usually use jquery to do this
I'm a little bit stuck with the new ContactsContract-API here. I think I don't
I'm a bit stuck here with a simple question: I have objects (coming via
As you can tell I'm new to multithreading and a bit stuck here. For
I'm a bit stuck here, basically I'm trying to compile Box2D as a static

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.