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/Questions/Q 5548
In Process
Richmond
Richmond

Richmond

  • 2 Questions
  • 2 Answers
  • 0 Best Answers
  • 31 Points
View Profile
  • 1
RichmondContributor
Asked: February 23, 20212021-02-23T14:41:34+05:30 2021-02-23T14:41:34+05:30

HOW TO CONVERT STRINGS TO DATE

  • 1

Can you help me out on this code and logic
I WANT TO CONVERT THIS 5/24/2021 TO 5/24/2021 AFTER PERFOMING DYNAMIC ACTION.

declare

m_date date;
duration number;

begin
number := 91;
SELECT to_date(:P35_DATE_OF_INVESTMENT)  +  duration into m_date FROM dual;

return to_date(trunc(m_date),'mm/dd/yyyy');

end;

maturity date = date of investment + duration.
i want to get the date in these format 5/24/2021 not these 5/24/2021 .

Thanks

date
  • 4
  • 90
  • 0
  • 0
  • Share
    • Share on Facebook
    • Share on Twitter
Answer

    4 Answers

    1. Vinish

      Vinish

      • 1 Question
      • 470 Answers
      • 45 Best Answers
      • 2k Points
      View Profile
      Vinish Legendary
      2021-02-23T14:47:42+05:30Added an answer on February 23, 2021 at 2:47 pm

      For the Oracle Apex date item, you need to convert it to date with the date format. I am assuming that you are already displaying the date in the mm/dd/yyyy (05/25/2021) format. Below is the example:

      declare
      m_date date;
      duration number;
      begin
      duration := 91;
      SELECT to_date(:P35_DATE_OF_INVESTMENT, 'mm/dd/yyyy')  +  duration
       into m_date FROM dual;
      return trunc(m_date);
      end;

       

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
      • Richmond

        Richmond

        • 2 Questions
        • 2 Answers
        • 0 Best Answers
        • 31 Points
        View Profile
        Richmond Contributor
        2021-02-23T15:20:10+05:30Replied to answer on February 23, 2021 at 3:20 pm

        Thank you for the prompt feedback.

        code works but

        still having the same issue on date item/colum.

        See image

        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
        • Vinish

          Vinish

          • 1 Question
          • 470 Answers
          • 45 Best Answers
          • 2k Points
          View Profile
          Vinish Legendary
          2021-02-23T18:14:03+05:30Replied to answer on February 23, 2021 at 6:14 pm
          This answer was edited.

          You need to turn off Escape Special Characters setting for the dynamic action you created for the date. Then it will be fine.

          • 0
          • Share
            Share
            • Share on Facebook
            • Share on Twitter
          • Richmond

            Richmond

            • 2 Questions
            • 2 Answers
            • 0 Best Answers
            • 31 Points
            View Profile
            Richmond Contributor
            2021-02-24T01:52:42+05:30Replied to answer on February 24, 2021 at 1:52 am

            Great

            Issue now resolved

            Thank you

            • 0
            • Share
              Share
              • Share on Facebook
              • Share on Twitter

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask Question
    Write a Post
    • Recent
    • Answers
    • GudDud

      Load PDF into APEX, Edit it and Print it.

      • 0 Answers
    • AnuK

      Error: Ajax call returned server error ORA-00932: inconsistent datatypes: expected ...

      • 0 Answers
    • pavlos

      How to reduce space between two Display Image items?

      • 1 Answer
    • Bheem

      Scrollable News with thumbnail

      • 0 Answers
    • Vinish
      Vinish added an answer You can reduce the number of column span for the… March 4, 2021 at 7:53 am
    • Abdulkareem
      Abdulkareem added an answer Below query is working fine SELECT city,name FROM JSON_TABLE ('[{"city":"Stockholm","name":"Lennart… March 3, 2021 at 6:16 pm
    • Vinish
      Vinish added an answer Below is the correct query: SELECT city, name FROM JSON_TABLE… March 3, 2021 at 9:18 am
    • Bheem
      Bheem added an answer Got the answer. Thank you March 3, 2021 at 9:07 am
    • afzal
      afzal added an answer STEP -1 CREATE REPORT LIKE-- select SAL AS "SALARY", NVL(COMM,0)… March 2, 2021 at 10:25 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