Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

End of month and other relative dates

Hi, what is the best way to get the start/end date of previous/current/next month relative to current date?


Best Answer

Found a way without using external applications, see screenshot attached for end of current month.


image


Great idea, thanks for sharing!

Hi!!! I am doing almost of Roman mentioned, but instead of convert to text and back, I am "Add to DateTime" (-%SelectedDate.Day-1%) so I find the first day and after that I add 1 month and add -1 day to find the last day...

Thanks all...


image



1 person likes this
ADMIN

Never thought of that. Thanks for sharing!

Answer

Found a way without using external applications, see screenshot attached for end of current month.


image

ADMIN

Hello Roman, 


In case you have access to an SQL Server, you can use a simple SQL query using the EOMONTH function to determine the last day of the month. For more information, please review this link.


Alternatively, you could use an excel file and use the EOMONTH() formula as described in this link.

Login or Signup to post a comment