What is the difference between Original Hire date and Continuous Hire date in Workday? - workday-api

What is the difference between Original Hire date and Continuous Hire date in Workday? I am currently working in WD support and want to know what is the difference between these two. How these are impacting payroll?

Original hire date and Continues hire date will be same for worker hired for first time.
If worker was hire in past and terminated, now rehired then Original hire date will be equal to terminated user hire date and Continues hire date will be equal to current hire date.
for payroll you have to check with your tenant setup.

Related

Amazon Redshift- How to get start date of the Week from existing daily date field from the table?

I am trying to get start date of the week from existing daily date field from the same table. For example daily dates from 05/08/2022 to 05/14/2022 , the start of the week date output need to come as 05/08/2022 for all days in the week. week start on Sunday.
Also similar thing require to first date of the Month and quarter(3 month division)
The date_trunc() function performs this operation - https://docs.aws.amazon.com/redshift/latest/dg/r_DATE_TRUNC.html

adding days to date in apex

I'm making a form where the user inputs their information and chooses a reservation date. So, the user picks a reservation date, and based on that date, I want to generate an end date that is 4 days after the start date.
I also want to make it so that if their reservation starts on a Monday it ends on a Thursday or if it starts on a Thursday it ends on a Monday.
How can I get the end date?
You will have to create your own PL/SQL stored procedure which will take in parameters the start date and the number of days to add.
Then your procedure will add the number of days and you will have a temp endDate.
Then, you will only have to check the day of the temp endDate, and if it is a weekend day, return the next Monday.
Apex allows you to have a dynamic action which can call a stored procedure and then update an item of your page.
Hope this helps.

WHERE 5 business days

I'm trying to get the next 5 business days, using sysdate in the WHERE (ie.
where trunc(teststart) between trunc(sysdate) and trunc(sysdate+4)),
but if the range includes Friday, it needs to count weekend days, Saturday & Sunday.
What is the command that will tell you the day of the week when looking at the sysdate or sysdate+3 (or any number)? How would you accomplish something like this?
You can't do this calculation because there is no way that oracle know what exactly is a business day. This is because every region has your own hollidays. To do this you will have to create a table calendar and put all days on it marking which ones is business day. Then you can just join your table with this calendar table using a between clause
#JorgeCampos point is well taken about day 1. You indicate with MON 0 that Monday is the start of the week, NLS settings on the DB and your locale determine this.
select to_char(sysdate, 'D'), to_char(sysdate,'DAY') from dual;
gives the result you asked for. We have a table that gets the next year populated in December for the next year. Includes all holidays, etc.
JCAL_JOB_DATE NOT NULL DATE
JCAL_USER_ID VARCHAR2(30)
JCAL_ACTIVITY_DATE DATE
JCAL_BUSINESS_DAY VARCHAR2(2)
JCAL_HOLIDAY VARCHAR2(2)
JCAL_WEEKEND VARCHAR2(2)
This is used to forecast jobs in the future, and some recurring jobs that do not want to run on holidays or weekends for example.
select jcal_job_date from jcal where
JCAL_JOB_DATE > sysdate
and JCAL_BUSINESS_DAY='Y'
and rownum <6;
This is one not-so-good way to get the fifth business day. Fetch You can use a lot of other functions to streamline this.
This kind of table is VERY useful to determine the same information (work, holiday, weekend) in the past.
Where I am we have holidays that fall on the last Thursday of November and extra holidays are added in there. Programming for that is hard when compared to a simple lookup that works great.

Calculate Sum of Products Over Time With Changes in Historical Values

Given two (simplified) tables in Access 2010:
**tblDailyLabour**
DailyLabourID - PK
DateRecorded
EmployeeID
QtyHours
**tblEmployeeHistory**
EmpHistoryID - PK
DateApplicable
EmployeeID
PayRate
Employee1 is entered into the database today. He's set in an 'Address Book' of employees with various values assigned to him. As of today he has a PayRate of $23.50/hr.
So from today moving forward, all hours logged will be calculated against today's rate for Employee1 at (23.50 * [QtyHours])
A month goes by and Employee1 gets a wage increase to $25.00/hr. This value is logged as a new entry in the 'Employee History' and is active as of, say, April 17th. So from April 17th onward he is now being calculated at (25.00 * [QtyHours]).
On a daily report this is straight forward as a query checks the report date and calculates the totals for Employee1. Whether the report is March 17th or April 25th, the query looks up the assigned rate and figures the total cost.
However, if I were to create an administrative report that was to evaluate the total cost of all days between March 17th and June 3rd, there may be several changes in the employee rates that need to be accounted for.
This is where I'm having a problem. I can't figure out how to not show any previous rates if DateApplicable is <= DateRecorded.
How might I go about writing a query that determines the rate on each day - dependent on the value in the Employee History - and calculate a total sum?
I apologize in advance if this question isn't phrased very well, but thanks a heap for any help!
I think it might be easier if you did a date range (start date & end date) in the 'address book' instead of just the start date.
On the current record, make the end date 12/31/9999. When entering a new current record, update the end date of the last record.

billing module

I'm launching a small service and plan to charge monthly (eg- will be advertised as $10 monthly). I'm working on the billing module right now but was wondering about a small bit:
I plan to bill customers when they first register and then at regular intervals thereafter. Getting to my question- Some months have less than 30 days. Does monthly billing imply exactly a 30 day interval or would anything between 28-30 days be considered a monthly interval?
I was planning on doing 30 because it seems that's what customers would expect, but I'm also curious if some companies charge at a fixed interval other than 30 days.
Billing monthly is assumed to be 12 times per year, not once every thirty days.
Preferably, billing should be on the anniversary of the original billing date of the month. If the current month has fewer days than the original billing DOM, bill on the last day of the current month, but on the next month, bill again on the anniversary day.