Creating a Stage variable to convert date
Moderators: chulett, rschirm, roy
Creating a Stage variable to convert date
I need to convert dates from an input data to the last day of the next month in a transformer stage and need help with how to achieve this.
Ernest A
To find the last day of a month, you can always go to the first day of the next month and then subtract one day (using an inherent date manipulation function, not your own).
There is always a way, but is there a good way? Anytime you are tasked with finding the last day of any month you have to write logic that is month and leap year sensitive. Anytime you have to do something like that then you have to do careful math. If you use inherent functions within a programming language that insulates you from those considerations then the odds of you doing correct math go up.
Time dimensions are just an elegant solution.
There is always a way, but is there a good way? Anytime you are tasked with finding the last day of any month you have to write logic that is month and leap year sensitive. Anytime you have to do something like that then you have to do careful math. If you use inherent functions within a programming language that insulates you from those considerations then the odds of you doing correct math go up.
Time dimensions are just an elegant solution.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle