Date & Time

if DateTimeInRange(Now, startCue, endCue) then
   SendUsineMsg('PLAY_WORKSPACE');
Procedure Description
var HoursPerDay Number of hours in a day
var MinsPerHour Number of minutes in an hour
var SecsPerMin Number of seconds in a minute
var MSecsPerSec Number of milliseconds in a second
var MinsPerDay Number of minutes in a day
var SecsPerDay Number of seconds in a day
var MSecsPerDay Number of milliseconds in a day
var DateDelta Offset between Delphi’s TDateTime base date and Unix epoch
type TDateTime: double; Represents both date and time as a floating-point value
type TTime: double; Represents only time as a floating-point value
function EncodeDate(Year, Month, Day: UInt16): TDateTime; Create a TDateTime value from year, month, and day
function EncodeTime(Hour, Min, Sec, MSec: UInt16): TDateTime; Create a TDateTime value from hour, minute, second, and millisecond
procedure DecodeDate(DateTime: TDateTime; var Year, Month, Day: UInt16); Extract year, month, and day from a TDateTime value
function DecodeDateFully(DateTime: TDateTime; var Year, Month, Day, DOW: UInt16): Boolean; Decode a TDateTime and return the day of week as well
procedure DecodeTime(DateTime: TDateTime; var Hour, Min, Sec, MSec: UInt16); Extract time components from a TDateTime value
function Date: TDateTime; Return the current system date
function Time: TDateTime; Return the current system time
function Now: TDateTime; Return the current system date and time
function GetTickCount: UInt32; Return the number of milliseconds since system start
procedure Sleep(MilliSeconds: UInt32); Pause execution for a specified number of milliseconds
procedure ReplaceTime(var DateTime: TDateTime; NewTime: TDateTime); Replace the time portion of a TDateTime value
procedure ReplaceDate(var DateTime: TDateTime; NewDate: TDateTime); Replace the date portion of a TDateTime value
function DateTimeInRange(ADateTime: TDateTime; AStartDateTime, AEndDateTime: TDateTime): Boolean; Check if a TDateTime lies within a given range
function FormatDateTime(Format: string; DateTime: TDateTime): string; Return a formatted string representation of a date/time value
function StrToDate(s: string): TDateTime; Convert a string to a date
function StrToDateDef(s: string; Default: TDateTime): TDateTime; Convert a string to a date, returning a default on error
function StrToTime(s: string): TDateTime; Convert a string to a time
function StrToTimeDef(s: string; Default: TDateTime): TDateTime; Convert a string to a time, returning a default on error
function StrToDateTime(s: string): TDateTime; Convert a string to a combined date/time
function StrToDateTimeDef(s: string; Default: TDateTime): TDateTime; Convert a string to a combined date/time, returning a default on error

more about scripts

version 7.0.250121

Edit All Pages