Sign Up

Hey, Dev!
Are you looking for a forum full of active developers to help you?
So if you want to:
➡️ Get answers for your development issues
➡️ Help others
➡️ Write an article
➡️ Get rewarded for your active participation
Then this place is just for you and it is 100% FREE.

Have an account? Sign In


Have an account? Sign In Now

Sign In

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

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

OrclQA.Com

OrclQA.Com Logo OrclQA.Com Logo
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Blog
  • New Questions
  • Tutorials
    • Oracle
    • Oracle Apex
    • Python
  • Tags
  • Users
  • Badges & Points
  • About
Home/afzal/Best Answers
  • About
  • Questions
  • Answers
  • Best Answers
  • Posts
  • Comments
  • Followers Questions
  • Followers Answers
  • Followers Posts
  • Followers Comments
  1. Asked: February 21, 2021

    How to create time duration item in Oracle APEX?

    afzal

    afzal

    • India
    • 0 Questions
    • 32 Answers
    • 1 Best Answer
    • 213 Points
    View Profile
    afzal Professional
    Added an answer on February 23, 2021 at 3:41 pm

    STEP 1-- CREATE ITEM "P115_START_TIME" AS SELECT LIST QUERY-- select to_char(TO_DATE('01/01/2021 09:00:00','DD/MM/YYYY HH:MI:SS') + (1/1440*(level-1)*15),'HH:MI AM') DISPLAY , to_char(TO_DATE('01/01/2021 09:00:00','DD/MM/YYYY HH:MI:SS') + (1/1440*(level-1)*15),'DD/MM/YYYY HH:MI AM') RETURN_VAL fromRead more

    STEP 1-- CREATE ITEM "P115_START_TIME" AS SELECT LIST
    QUERY--

    select to_char(TO_DATE('01/01/2021 09:00:00','DD/MM/YYYY HH:MI:SS') + (1/1440*(level-1)*15),'HH:MI AM') DISPLAY ,
    to_char(TO_DATE('01/01/2021 09:00:00','DD/MM/YYYY HH:MI:SS') + (1/1440*(level-1)*15),'DD/MM/YYYY HH:MI AM') RETURN_VAL
    from dual CONNECT BY LEVEL<97;

    NOTE- Format Mask===>DD/MM/YYYY HH:MI AM

    STEP 2-- CREATE SECOND ITEM "P115_END_TIME" AS SELECT LIST

    QUERY--
    select TO_CHAR(TO_DATE(:P115_START_TIME,'DD/MM/YYYY HH:MI AM') + (1/1440*(level-1)*15),'HH:MI AM')||
    CASE WHEN (((level-1)*15))/60 >1 THEN
    CASE WHEN MOD(((level-1)*15),60)> 0 THEN '( '|| FLOOR((((level-1)*15))/60)||' HOURS '|| MOD(((level-1)*15),60)||' MINUTES )'
    ELSE '( '||(((level-1)*15))/60||' HOURS)'
    END
    ELSE
    CASE WHEN ((level-1)*15)=0 THEN '( 0 MINUTES )'
    ELSE
    CASE WHEN MOD(((level-1)*15),60) = 0 THEN '( 1 HOURS )'
    ELSE '( '||MOD(((level-1)*15),60)||' MINUTES )'
    END
    END
    END AS DD ,
    ((level-1)*15) RR //--RETURN VALUE AS YOUR REQUIREMENT

    from dual CONNECT BY LEVEL<97

    Cascading List of Values --
    PARENT ITEM-- P115_START_TIME

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter

Sidebar

Ask Question
Write a Post
  • Recent
  • Answers
  • Bheem

    How to deploy oracle apex app in oracle SaaS

    • 0 Answers
  • Rameez Tariq

    How to create View with Blob column through DBLINK

    • 0 Answers
  • Huy Nguyen

    Dynamic action on column on Interactive Grid

    • 3 Answers
  • GudDud

    Load PDF into APEX, Edit it and Print it.

    • 0 Answers
  • Huy Nguyen
    Huy Nguyen added an answer Thank you for your good idea. March 5, 2021 at 12:09 pm
  • Vinish
    Vinish added an answer Oh, this will work for only new rows. For existing… March 5, 2021 at 11:22 am
  • Vinish
    Vinish added an answer I think you do not need to create the dynamic… March 5, 2021 at 11:14 am
  • Vinish
    Vinish added an answer Are you converting your CLOB to varchar2 in the report?… March 5, 2021 at 6:56 am
  • Vinish
    Vinish added an answer You can reduce the number of column span for the… March 4, 2021 at 7:53 am

Recent Blog Posts

  • Vinish

    Oracle Apex - Display External File in Region

  • Vinish

    Oracle PL/SQL Download BLOB File to Disk

  • Vinish

    Oracle Convert External File to BLOB

  • Vinish

    Oracle Apex Calendar Example

  • Vinish

    Oracle Apex - Open Modal Dialog Page Using JavaScript

Explore

  • Home
  • Blog
  • New Questions
  • Tutorials
    • Oracle
    • Oracle Apex
    • Python
  • Tags
  • Users
  • Badges & Points
  • About

© 2021 OrclQA.Com. All Rights Reserved. Privacy Policy