NO OF WEEKS
Moderators: chulett, rschirm, roy
NO OF WEEKS
When I tried to find out no of weeks with the formula that is Current Date - Hiredate /7 it gave me same no of days in each column.. How would I do this? It seems it is not recognizing different hiredates in each column.. Please let me know how would I find the no of weeks
There are no datatypes in DS Server. You need to write a function to subtract dates. Better yet, have one that understands dates and time. Here's one I posted a long time ago:
viewtopic.php?t=85788
Create a function and paste this logic into it, it will do what you need most of the way. Have fun.
viewtopic.php?t=85788
Create a function and paste this logic into it, it will do what you need most of the way. Have fun.
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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
When you learned arithmetic at school, what did they teach you about precedence?
What's the difference between these two expressions?
However, the result will be a decimal number - that is, it may include a fractional number of weeks. Adjust using the Int() function.
What's the difference between these two expressions?
- CurrentDate - HireDate / 7
(CurrentDate - HireDate) / 7
However, the result will be a decimal number - that is, it may include a fractional number of weeks. Adjust using the Int() function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Not to derail this, but...
Ray, I could have sworn in the past you've said that DataStage was an odd duck in that it did not enforce any precedence when evaluating expressions? That it is, without parens, evaluated strictly from left to right. Am I mis-remembering?
![Confused :?](./images/smilies/icon_confused.gif)
Ray, I could have sworn in the past you've said that DataStage was an odd duck in that it did not enforce any precedence when evaluating expressions? That it is, without parens, evaluated strictly from left to right. Am I mis-remembering?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I was talking about logic, not arithmetic. Arithmetic follows the rules. Logic (stuff with AND and OR) runs left to right unless parentheses occur.chulett wrote:Not to derail this, but...![]()
Ray, I could have sworn in the past you've said that DataStage was an odd duck in that it did not enforce any precedence when evaluating expressions? That it is, without parens, evaluated strictly from left to right. Am I mis-remembering?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.