Hi,
I have a querry, a small one...I hope someone can help me out with it.
I need to extract just the month from the date which is in format YYYY-MM-DD. can some one help me out with it.
Thanks in advance
Month from Date YYYY-MM-DD
Moderators: chulett, rschirm, roy
This date... is it an actual Date datatype or is it a string? For the former, there are functions to get that, for the latter you can use substring.
Also, you marked the job as Server yet posted in the PX forum, which job type is it? That will change the answer as to the function needed.
Also, you marked the job as Server yet posted in the PX forum, which job type is it? That will change the answer as to the function needed.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
its in datetime format, its a server job..chulett wrote:This date... is it an actual Date datatype or is it a string? For the former, there are functions to get that, for the latter you can use substring.
Also, you marked the job as Server yet posted in the PX forum, which job type is it? That will change the answer as to the function needed.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you're reading a string containing a timestamp, just use substring technique.
If you want to remove leading zero, just use this in an arithmetic expression.
Since server edition does not have an internal timestamp representation that's all the discussion there needs to be.
Oconv() is not your friend here.
Code: Select all
InLink.TheString[6,2]
Code: Select all
InLink.TheString[6,2] + 0
Oconv() is not your friend here.
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.