Skip to main content

SalDateTime

Namespace: PPJ.Runtime

Assembly: PPJ.Runtime.49 (4.9.0.0)

SAL Date/Time basic type. It wraps .NET native DateTime type. SalDateTime objects are automatically cast to and from DateTime.

public struct SalDateTime : ValueType, IComparable, IConvertible, IFormattable, INullable, ISalType, IXmlSerializable

Constructors

Instance memberSalDateTime(x)

Creates a new SalDateTime.

NameTypeDescription
xDateTimeDateTime initial value

Instance memberSalDateTime(year, month, day)

Create a new SalDateTime

NameTypeDescription
yearInt32
monthInt32
dayInt32

Instance memberSalDateTime(year, month, day, hour, minute, second)

Create a new SalDateTime

NameTypeDescription
yearInt32
monthInt32
dayInt32
hourInt32
minuteInt32
secondInt32

Instance memberSalDateTime(year, month, day, hour, minute, second, milliseconds)

Create a new SalDateTime

NameTypeDescription
yearInt32
monthInt32
dayInt32
hourInt32
minuteInt32
secondInt32
millisecondsInt32

Properties

Static memberCurrent

SalDateTime: Returns the PC's current date/time.

Instance memberIsNull

Boolean: Checks if this SalDateTime object contain a null value.

Instance memberTicks

Int64: Returns the number of ticks.

Static memberTreatMinValueAsNull

Boolean: Gets or sets a property that enables the automatic conversion of DateTime.MinValue SalDateTime.Null.

Instance memberValue

DateTime: Returns the inner DateTime value

Methods

Instance memberAddDays(days)

Add days or fraction of days to the date.

ParameterTypeDescription
daysDouble

Returns: SalDateTime.

Static memberCompare(x, y)

Compares two SalDateTime

ParameterTypeDescription
xSalDateTime
ySalDateTime

Returns: Int32.

Instance memberCompareTo(obj)

Compare to object

ParameterTypeDescription
objObject

Returns: Int32.

Instance memberCompareTo(x)

Compare to datetime

ParameterTypeDescription
xSalDateTime

Returns: Int32.

Instance memberDay()

Returns the day portion (1 to 31) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

Returns: SalNumber.

Instance memberHour()

Returns the hour portion (0 to 23) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

Returns: SalNumber.

Instance memberMinute()

Returns the minute portion (0 to 59) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

Returns: SalNumber.

Instance memberMonth()

Returns the month portion (1 to 12) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

Returns: SalNumber.

Instance memberMonthBegin()

Returns the date of the first day of the month or it returns DATETIME_Null if the value you specify is null. For example, if dtDateTime is December 25, 1992, SalDateMonthBegin returns December 1, 1992.

Returns: SalDateTime. dtMonthBegin

Instance memberQuarter()

Returns the quarter of the year (1 to 4) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

Returns: SalNumber. nQuarter

Instance memberQuarterBegin()

Returns the date of the first day of the quarter of a date/time value or it returns DATETIME_Null if the value you specify is null.

Returns: SalDateTime. dtQuarterBegin

Instance memberSecond()

Returns the seconds portion (0 to 59) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

Returns: SalNumber. nSeconds

Instance memberSubtract(x)

Subtract SalDateTime from SalDateTime.

ParameterTypeDescription
xSalDateTime

Returns: Double.

Instance memberToDateTime()

Returns the DateTime value.

Returns: DateTime.

Instance memberWeekBegin()

Returns the date of the previous Monday or the current day if it is a Monday or it returns DATETIME_Null if the value you specify is null.

Returns: SalDateTime. dtWeekBegin

Instance memberWeekday()

Returns the day of the week as a number between 0 and 6 or returns -1 if you specify DATETIME_Null as a parameter. 0 represents Saturday, 1 represents Sunday, and so on.

Returns: SalNumber.

Instance memberYear()

Returns the year portion of a date or returns -1 if you specify DATETIME_Null as a parameter.

Returns: SalNumber.

Instance memberYearBegin()

Returns the date of the first day of the year or it returns DATETIME_Null if the value you specify is null.

Returns: SalDateTime. dtYearBegin

Used By

NameDescription
Sal.DateYearReturns the year portion of a date or returns -1 if you specify DATETIME_Null as a parameter.
Sal.DateYearBeginReturns the date of the first day of the year or it returns DATETIME_Null if the value you specify is null.
SalDateTime.CurrentReturns the PC's current date/time.
SalDateTime.WeekBeginReturns the date of the previous Monday or the current day if it is a Monday or it returns DATETIME_Null if the value you specify is null.
SalFileHandle.SetDateTimeSets the modification date and time of the specified file.
SalString.ToDateConverts a string to a date/time value.
SalSafeArray.PutDateStores a DateTime item in the safearray.
SalSafeArray.PutDate2D
SalSafeArray.PutDateMDMultidimensional safe array
SalVariant.SetDate
SalDataField.DateTimeDateTime value property.
SalTableColumn.DateTimeDateTime value property.
Vis.TblFindDateTime
Vis.FileSetDateTime
Vis.ArrayFillDateTime
Vis.ArrayFindDateTime
VisCalendar.IsSelectedDate
VisCalendar.SetFocusDate
VisCalendar.SelectDate
VisCalendar.SetSpecialDate
VisCalendar.IsSpecialDate
VisCalendarDropDown.Value
XSal.ZipCreateFile
XSal.StrFormatDateTime
XSal.StrFormatDateTimeX