Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

DateSub

  • Last UpdatedJul 18, 2023
  • 1 minute read

Subtracts time (in seconds) from a time/date value. The return value is in time/date variable format. Use this function for time and date calculations.

Syntax

DateSub(Time, SubTime)

Time:

The time/date from which the SubTime will be subtracted.

SubTime:

The time to subtract, in seconds.

Return Value

The time difference (in seconds) as an integer.

Date, DateAdd

Example

Variable=DateSub(StrToDate("05/11/91"),StrToDate("03/11/91"));

! Sets Variable to number of seconds between 2 date/times.

Str=TimeToStr(Variable,5);

! Sets Str to "48:00:00".

See Also

Time and Date Functions

In This Topic
TitleResults for “How to create a CRG?”Also Available in