what is the DESCRIBE for the table please? I’m interested in knowing if the times you have given above are VARCHAR2 or DATE (or something else entirely!)
What is the version of Oracle too, that can be relevant.
So, assuming (always a bad idea) that your columns are DATEs and that you wish to subtract one time from the other and get a response in minutes, you need a little work.
Subtracting two DATEs gives a result in DAYs.
Multiplying the result in DAYs by the number of minutes in a day should give you what you want.
select (END_TIME1 - BEGIN_TIME1) * (246060)
should give you the answer. The above used 246060 as it’s easy to see what’s going on, but you could save a microscopic amount of time in the processing of the query by substituting 86400 for (246060) if you wish.
If your columns are VARCHAR2s then you have more work to do to convert them to dates.
select (to_date(end_time1, ‘HH24MI’) - to_date(begin_time1, ‘HH24MI’) * (246060)
As an aside, always always always use the correct data type for storing your data in the database.
Dates and/or Times should be DATE, or TIMESTAMP or TIMESTAMP WITH TIME ZONE etc.
Character data should be CHAR, VARCHR2, NVARCHAR2 or NCHAR etc.
Numbers should be an appropriate NUMBER(x,y) to set the correct scale and precision.
And so on.
This is especially true when using said columns in foreign key constraints etc. And the should (aka MUST!) match in descriptions across each table. If you have the parent table with VARCHAR2 and the child table(s) with NUMBER or DATE then you will cause no end of (a) potential problems and (b) performance issues and © optimiser troubles as the optimiser cannot properly optimise joined columns where implicit (or explicit) conversion functions (like to_date or to_char etc) have to be applied to one column to get it to match the other.
I have been known to rant on and on about this “incorrect usage of data types” problem at some length, I apologise now if this doesn’t apply to you!
Have fun, and good luck.