You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started with Redwood for Oracle Cloud HCM   Begin Now
To ensure that questions get required attention from community members and are NOT left unanswered, it’s important for the author to indicate (by selecting “Yes” or “No” when prompted) whether the question was answered. (newly added) Please note that it is also important to respond to EACH comment your question receives. Your Yes or No response ensures an accurate status for your question.

For more information, please refer to this announcement explaining best practices for getting answers to questions.

OTBI - Defaulting Date Values

edited Mar 3, 2021 10:05AM in Reporting and Analytics for HCM 1 comment

Summary

OTBI - Default Date Values

Content

Requirement

    Let say, your financial year start date is 01-Jul. 

 

   If the month is between 01-Jul(previous year Eg., 2020) to 30-Jun, then date should be defaulted to 01-Jul-2020

   If the month is between 01-Jul(current year Eg., 2021) to 30-Jun, then date should be defaulted to 01-Jul-2021

The below query will help you to set the default values with the above requirement,

SELECT CASE WHEN MONTH("Workforce Management - Worker Assignment Event Real Time"."Time"."Calendar Date")<7 AND "Workforce Management - Worker Assignment Event Real Time"."Time"."Calendar Year" =YEAR("Workforce Management - Worker Assignment Event Real Time"."Time"."Calendar Date") THEN TIMESTAMPADD(SQL_TSI_MONTH,-6,"Workforce Management - Worker Assignment Event Real Time"."Time"."Calendar Year Start Date") WHEN MONTH("Workforce Management - Worker Assignment Event Real Time"."Time"."Calendar Date")>=7 AND "Workforce Management - Worker Assignment Event Real Time"."Time"."Calendar Year" =YEAR("Workforce Management - Worker Assignment Event Real Time"."Time"."Calendar Date") THEN TIMESTAMPADD(SQL_TSI_MONTH,6,"Workforce Management - Worker Assignment Event Real Time"."Time"."Calendar Year Start Date") END s_1 FROM "Workforce Management - Worker Assignment Event Real Time" WHERE ("Time"."Calendar Date" = CURRENT_DATE)

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!