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

AVEVA™ Plant SCADA

StrToDate

  • Last UpdatedJul 18, 2023
  • 1 minute read

Converts a "date" string into a time/date variable. This variable is the same as returned from the TimeCurrent() function. To set the order of the day, month, and year, and the delimiter, use the Windows Control panel.

Time/date functions can only be used with dates from 1980 to 2035. You should check that the date you are using is valid with the following Cicode:

IF StrToDat(Arg1)>0 THEN

...

ELSE

...

END

Syntax

StrToDate(String)

String:

The source string.

Return Value

A time/date variable, or 274 if the time/date is out of range.

StrToPeriod, StrToTime

Example

! Australian format (dd/mm/yy) is set in the Windows Control panel.

DateVariable=DateAdd(StrToDate("3/11/95"),86400);

NewDate= TimeToStr(DateVariable, 2);

! Adds 24 hours to 3/11/95 and sets NewDate to "4/11/95".

See Also

String Functions

Using the Caret Escape Sequence Character

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