User Tools

Site Tools


datetime

DateTime

It is useful to operate on dates and times.

PROPERTIES

Day

Property Day As Integer (ReadWrite)


Month

Property Month As Integer (ReadWrite)


Year

Property Year As Integer (ReadWrite)


Hour

Property Hour As Integer (ReadWrite)


Minute

Property Minute As Integer (ReadWrite)


Second

Property Second As Integer (ReadWrite)


(MSecond

Property MSecond As Integer (ReadWrite)


METHODS

(AsString

Function AsString() As String


(AsString

Function AsString(DateTimeFormat As String) As String

Possibles values are StandardDate, LongDate, MediumDate, ShortDate, StandardTime, LongTime, MediumTime, ShortTime

e.g. AsString(“StandardDate”)

AsString(kb.StandardDate)


(AsString

Function AsString(DateTimeFormat As String) As String

e.g. AsString(”yyyy-MM-dd …”)


DayOfWeek

Function DayOfWeek() As String

Possible values are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday


DayOfYear

Function DayOfYear() As Integer


DaysInMonth

Function DaysInMonth() As Integer


DaysInYear

Function DaysInYear() As Integer


WeekNumber

Function WeekNumber () As Integer


IsLeapYear

Function IsLeapYear() As Boolean


(Equal

Function Equal(OtherDateTime As DateTime) As Boolean


(OlderAs

Function OlderAs(OtherDateTime As DateTime) As Boolean


(YoungerAs

Function YoungerAs(OtherDateTime As DateTime) As Boolean


DiffDays

Function DiffDays(OtherDateTime As DateTime) As Integer


DiffSeconds

Function DiffSeconds(OtherDateTime As DateTime) As Integer


(DiffMSeconds

Function DiffMSeconds(OtherDateTime As DateTime) As Integer


AddDate

Sub AddDate(OtherDateTime As DateTime)


AddDays

Sub AddDays(Days As Integer)


AddMonths

Sub AddMonths(Months As Integer)


AddYears

Sub AddYears(Years As Integer)


SubDate

Sub SubDate(OtherDateTime As DateTime)


SubDays

Sub SubDays(Days As Integer)


SubMonths

Sub SubMonths(Months As Integer)


SubYears

Sub SubYears(Years As Integer)


AddTime

Sub AddTime(OtherDateTime As DateTime)


AddHours

Sub AddHours(Hours As Integer)


AddMinutes

Sub AddMinutes(Minutes As Integer)


AddSeconds

Sub AddSeconds(Seconds As Integer)


(AddMSeconds

Sub AddMSeconds(Seconds As Integer)


SubTime/SubHours

Sub SubHours(Hours As Integer)


SubMinutes

Sub SubMinutes(Minutes As Integer)


SubSeconds

Sub SubSeconds(Seconds As Integer)


(SubMSeconds

Sub SubMSeconds(Seconds As Integer)


STATIC METHODS

Now

Static Function Now() As DateTime


(DateTimeFormat

Static Function DateTimeFormat(Format As String) As String

LongFormat, ShortFormat


(DateFormat

Static Function DateFormat(Format As String) As String

LongFormat, ShortFormat


(TimeFormat

Static Function TimeFormat(Format As String) As String

LongFormat, ShortFormat


(CurrentDate

Static Function CurrentDate() As DateTime


(CurrentTime

Static Function CurrentTime() As DateTime


(FromString

Static Function FromString(DateTime As String) As DateTime


(CurrentDayOfWeek

Static Function CurrentDayOfWeek() As Integer


(CurrentMonthOfYear

Static Function CurrentMonthOfYear() As Integer


(Weekday

Static Function Weekday(Date As DateTime) As Integer


(YearMonth

Static Function YearMonth(Date As DateTime) As Integer


IsDateValid

Static Function IsDateValid(Year As Integer, Month As Integer, Day As Integer) As Boolean


IsTimeValid

Static Function IsTimeValid(Hour As Integer, Minute As Integer, Second As Integer) As Boolean


(IsDateTimeValid

Static Function IsDateTimeValid(Year As Integer, Month As Integer, Day As Integer, Hour As Integer, Minute As Integer, Second As Integer) As Boolean


IsDateTimeValid

Static Function IsDateTimeValid(DateTime) As Boolean


MonthName

Static Function MonthName (Month As Integer, Format As String) As String


DayName

Static Function DayName (WeekDay As Integer, Format As String) As String


datetime.txt · Last modified: 2013/04/09 22:57 (external edit)