i get yyyymmdd format date , i need output as yyyymmdd(but dd has to be last day of month 'mm', is there a direct funtion to pull last day of any month,
For Example: Input filed = 20130814, then output should = 20130831
last day from date
Moderators: chulett, rschirm, roy
Well... you could always play the old game of setting the date to the first day of the next month and then subtracting one day from it.
You could also build yourself a "DaysInMonth" routine... only four possible answers after all with some pretty well-known rules for the only one that is a variable.
You could also build yourself a "DaysInMonth" routine... only four possible answers after all with some pretty well-known rules for the only one that is a variable.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
May be you can start from here.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
Field("31|28|31|30|31|30|31|31|30|31|30|31", "|", MonthFromDate(InLink.TheDate), 1)
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.