Get end of Month based on year and Month
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
You made me write the code for you but test it if it works in every scenario (it expects input data in yyyymmdd or yyyymm format).
This you could have done yourself if you would have thought about it after getting many leads in earlier posts and in that case you could have learned the basics.
You may have to do null handling if input contains null.
Code: Select all
datefromdayssince(-1,if InLink.DateString[5,2] =12 then InLink.DateString[1,4]+1:"-01-01" else InLink.DateString[1,4]:"-":right("00":InLink.DateString[5,2]+1,2):"-01")
You may have to do null handling if input contains null.
Last edited by priyadarshikunal on Wed Mar 03, 2010 12:17 pm, edited 1 time in total.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.![Wink :wink:](./images/smilies/icon_wink.gif)
Genius may have its limitations, but stupidity is not thus handicapped.
![Wink :wink:](./images/smilies/icon_wink.gif)
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Its very simple in Unix
Code: Select all
echo $(cal 12 2008) | awk ' { print $NF } '
You are the creator of your destiny - Swami Vivekananda