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

  • Home
  • SEARCH
  • 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 8227979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:18:56+00:00 2026-06-07T16:18:56+00:00

I have a date (4/30/2012), an hour (4) and a minute (45). I need

  • 0

I have a date (4/30/2012), an hour (4) and a minute (45). I need to convert that to an Oracle datetime value for comparison in a PLSQL/Oracle SELECT statement. Ideally, there would be a function like this (C# since I know it a little better):

var date = "4/30/2012";
var hour = "4";
var minute = "45";
DateTime myDateTime = convertDateTime(date, hour, minute);

I have a table with three columns to make up the date and time of an event. I have another table that has items that may or may not match based on their start and end dates. In pseudo SQL, here’s what I’m trying to do:

SELECT 
    G.Name, 
    (SELECT MAX(Cost) 
        FROM CrappyTable AS C 
        WHERE G.StartTime < convertDateTime(C.Date, C.Hour, C.Minute) 
        AND G.EndTime > convertDateTime(C.Date, C.Hour, C.Minute)) as Cost
FROM GoodTable as G
WHERE G.Price < 100.00;

OR “Select name and max cost (from reported cost during a time range)
where the price is less than $100.”

Is there an existing function that might do something like the above convertDateTime function?

  • 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-07T16:18:59+00:00Added an answer on June 7, 2026 at 4:18 pm

    Concatenate your date and time fields and pass them to TO_DATE (assumes 24 hour clock time):

    TO_DATE(date||' '||hour||':'||minute,'MM/DD/YYYY HH24:MI')
    

    This will convert your date/time values to an Oracle DATE type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Oracle DATE column with, for example, these values: RUN_DATE ------------------- 2012-06-09
I have a jArray and a string from that jArray, message2: [{date:2012,count:1,message : message1},
I have a certain value of date and time say 28-3-2012(date) - 10:36:45(time) .
I have a date as follows. $discount_start_date='03/27/2012 18:47'; $start_date=new DateTime($discount_start_date); $start_date->format('Y/m/d H:i:s'); How can
I have a small javascript control that allows users to select a date and
In my table I have DateTime , Hour column. example : 2012-05-14 00:00:00.000 and
I have the following string i need to parse to a date: 2012-01-31T08:41:12.5462495+01:00 now
I have a table in which the value are Table_hello date col2 2012-01-31 23:01:01
I have date 2012-04-02 10:01:00 am I want to show this date in with
I have a variable called $effectiveDate containing the date 2012-03-26 . I am trying

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.