Get free live demo
Login
Cart
Home
Home
What is VisualCron?
Why choose VisualCron?
Our customers
Testimonials
Search
Social
Technology
Features
GENERAL
Features
Screenshots
API / SDK
Technology
ARCHITECTURE
Tasks
Triggers
Connections
AUTOMATION
General automation
Task Scheduler
FTP / SFTP/ SCP automation
Batch and exe automation
PowerShell automation
Cloud automation
Business Process Automation (BPA)
Encryption automation
SQL / database automation
Web macro recorder automation
Robotic Process Automation (RPA)
Managed File Transfer (MFT)
Extract Transform Load (ETL)
PDF automation and data extraction
XML automation and manipulation
Image automation and manipulation
Office 365, Excel and Macro Automation
Sharepoint automation
Archive automation
Virtual Machine Automation
Document scanning / OCR
ABOUT VISUALCRON
VisualCron is an
Automation
,
Integration
and
Task Scheduling Tool
for
Windows
.
Get free live demo
Download
Download
Change log
Requirements
Get free live demo
Order
Order
License guide
Choosing the right license
Basic vs Pro edition comparison
Cart
Get price quote
Use PO / get invoice
Return policy
Company information
Reseller information
Partners
Get free live demo
Support
Community forum
Documentation
Video tutorials
Maintenance & priority support
Contact us
Get free live demo
My pages
Start
My profile
My contacts
My licenses
My cloud Servers
My orders
Blog
Site map
Community forum
Support
Community forum
Please note that VisualCron support is not actively monitoring this community forum. Please use our
contact page
for contacting the VisualCron support directly.
Welcome Guest! To enable all features please
Login
or
Register
.
×
Forum
Search
Login
Register
Login
×
User Name or E-Mail Address:
Password:
Caps Lock is on
Remember me
×
Forum
Support
General problem solving
How to get last day of prior month
How to get last day of prior month
Previous Topic
Next Topic
Tools
Email this topic
Watch this topic
Print this topic
GrahamG
No customer
Topic Starter
2009-01-26T12:00:53Z
#1
Is this the correct way to calculate the last day of the prior month ?
{DATENOWADD(Days,-{DATEFORMAT(JulianYearDay)},yyyyMMdd )}
Thanks
Graham
Quick Reply
Reply
View All Posts by User
Sponsor
Forum information
Wanna join the discussion?!
Login to your Forum forum account
or Register a new forum account
×
Support
Official support
2009-01-26T13:02:21Z
#2
Are you thinking about last day as in 1 - 31?
Henrik
Support
http://www.visualcron.com
Please
like
VisualCron on facebook!
Quick Reply
Reply
View All Posts by User
GrahamG
No customer
Topic Starter
2009-01-26T13:05:41Z
#3
31 - it's the last day of the prior month. As we are currently in Jan, the it would be the last day of Dec, which is 31.
Graham
Quick Reply
Reply
View All Posts by User
Support
Official support
2009-01-26T13:09:27Z
#4
Try this: {DATEADD(Days,{DATEFORMAT(yyyy-MM-01 HH:mm)},yyyy-MM-dd HH:mm,-1,dd)}
I am extracting the current year and month and explicitly set day 01. Then I am subtracting 1 day and formatting to "dd".
Edited by user
2009-01-26T13:10:52Z
|
Reason: Not specified
Henrik
Support
http://www.visualcron.com
Please
like
VisualCron on facebook!
Quick Reply
Reply
View All Posts by User
Support
Official support
2009-01-26T13:13:34Z
#5
You can make this a bit shorter by removing HH:mm: {DATEADD(Days,{DATEFORMAT(yyyy-MM-01)},yyyy-MM-dd,-1,dd)}
Henrik
Support
http://www.visualcron.com
Please
like
VisualCron on facebook!
Quick Reply
Reply
View All Posts by User
GrahamG
No customer
Topic Starter
2009-01-26T14:11:14Z
#6
Hi support,
Aplogies, I misunderstood your question until I tested the result.
I need the output to be yyyymmdd which is the full date of the last day of the month.
Graham
Quick Reply
Reply
View All Posts by User
Support
Official support
2009-01-26T14:17:11Z
#7
Then you just change the format to this:
{DATEADD(Days,{DATEFORMAT(yyyy-MM-01)},yyyy-MM-dd,-1,yyyyMMdd)}
Henrik
Support
http://www.visualcron.com
Please
like
VisualCron on facebook!
Quick Reply
Reply
View All Posts by User
Similar Topics
Timetrigger - last working day of the month
(
Feature requests
) by
SPIEDV
2010-10-14T17:56:52Z
First and Last Day of the Month written in C#
(
General problem solving
) by
Michael Fjellström
2022-11-11T16:51:29Z
Running a Job the last week of the month except the last day
(
General problem solving
) by
CAMoll
2018-04-27T23:39:37Z
[solved] Job/Task Control - Run only on the last day of the month
(
General problem solving
) by
Gary_W
2022-04-14T18:36:55Z
Friday is Last Working Day of Month and Monday Is a Bank Holiday Check
(
General problem solving
) by
aon_vc
2017-10-02T19:31:04Z
Users browsing this topic
Guest
Forum
Support
General problem solving
How to get last day of prior month
© VisualCron
Scroll to Top