Promotic
WikipediaLinkedInYoutubeTwitterFacebook

CreateDate - method of object Pm

Description:
Creates date and time from its individual components or from time interval.
Syntax:
CreateDate(nYear As Long, nMonth As Long, nDay As Double, nHour As Double, nMinute As Double, nSecond As Double, nMilli As Long) As Date
Calling:
t = Pm.CreateDate(nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilli)
Parameters:
nYear(Long) Year set as the absolute value, for example 2017. If the method has to return the time internal, then 0 must be set.
nMonth(Long) Month of the year (1-12). If the method has to return the time internal, then 0 must be set.
nDay(Double)

If the method has to return the absolute time, then the day of the month (1-31) is set.

If the time interval has to be returned, then the number of days is set.

nHour(Double)

If the method has to return the absolute time, then the hour of the day (0-23) is set.

If the time interval has to be returned, then the number of hours is set.

nMinute(Double)

If the method has to return the absolute time, then the minute of the hour (0-59) is set.

If the time interval has to be returned, then the number of minutes is set.

nSecond(Double)

If the method has to return the absolute time, then the second of the minute (0-59) is set.

If the time interval has to be returned, then the number of seconds is set.

nMilli(Long) Sets the number of milliseconds (0-999).
Note:
The method can also be called in the graphic item events for Web panels.
Example1:
The absolute time returned by the method is: 22.3.2017 12:30:30.500.
JavaScriptVBScriptSelect and copy to clipboard

var tDate = Pm.CreateDate(2017, 3, 22, 12, 30, 30, 500);
Example2:
The time interval returned by the method is 42 days, 12 hours and 30 minutes.
JavaScriptVBScriptSelect and copy to clipboard

var tDateInterval = Pm.CreateDate(0, 0, 42, 12, 30, 0, 0);
PROMOTIC 8.3.23 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- CreateDate
 
 
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice