How can we use Date Add function in Vijeo Citect VBA.
CitectVBA has several pre-defined date and time functions that return date/time values. You can perform arithmetic or mathematics (math) on date/time values because CitectVBA stores dates internally as serial values. Adding or subtracting integers adds or subtracts days, while adding or subtracting fractions adds or subtracts time. Therefore, adding 20 to a date value in CitectVBA adds 20 days, while subtracting 1/24 subtracts one hour. For example, to get tomorrow's date, you could just add 1 to today's date, like this:
dtmTomorrow = Date()+ 1
Date is a built-in CitectVBA function that returns the date portion (the integer part) of the current date and time retrieved from the Windows operating system. Adding 1 to that value returns a date that represents the next day.