hi all
can you please tell me the code how to find lastday of previous month in dd-mm-yyyy format
last date of previous month
Moderators: chulett, rschirm, roy
I'm not going to code it all up for you, but here are the steps you'd need to derive that:
* Get current date in any format
* Replace Day # portion with '1'
* Convert to Internal format using IConv
* Subtract 1 from Internal value
* Convert back to External format of choice using OConv
That should be simple enough to build a little routine to do.
You can also look at the MONTH.LAST transform under the Transforms / Built-In / Dates branch of the Manager for another approach.
* Get current date in any format
* Replace Day # portion with '1'
* Convert to Internal format using IConv
* Subtract 1 from Internal value
* Convert back to External format of choice using OConv
That should be simple enough to build a little routine to do.
![Idea :idea:](./images/smilies/icon_idea.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
It always better to search before your post your post.
These posts will help you in achieving what you want.
viewtopic.php?t=102746&highlight=month
viewtopic.php?t=101373&highlight=month
viewtopic.php?t=100700&highlight=month
viewtopic.php?t=91657&highlight=month
Next time, a good search should atleast get you started.
Whale.
These posts will help you in achieving what you want.
viewtopic.php?t=102746&highlight=month
viewtopic.php?t=101373&highlight=month
viewtopic.php?t=100700&highlight=month
viewtopic.php?t=91657&highlight=month
Next time, a good search should atleast get you started.
![Wink :wink:](./images/smilies/icon_wink.gif)
Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE