PrecisionPLC Posted August 21, 2020 Report Posted August 21, 2020 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
chelton Posted August 21, 2020 Report Posted August 21, 2020 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now