Sign in to follow this  
Followers 0
PrecisionPLC

Monthly Data

2 posts in this topic

If anyone could help, i want to be able to reset a counter on the first of every month, I have extracted date from date and time of day, I just can not find anything to compare the 1st of each month with without physically writing out the 1st of each month in this format 2020-08-01, if I do this I would have to do every month and then every year as well, i want to be able to compare todays date with start of month and reset my counter.

Any help would be much appreciated 

Share this post


Link to post
Share on other sites

There's a function called DtToDateStruct. Input the current time into this. The output has the date/time in array. You can then compare the day value with 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0