Welcome

Welcome, thanks to look my blog

Friday 18 December 2015

Date/Time routines

Date/Time routines

CompareDate function
Compares two TDateTime values (returns "less", "equal" or "greater"). Ignores the Time part if both values "fall" on the same day.

CompareDateTime function
Compares two TDateTime values (returns "less", "equal" or "greater").
CompareTime function
Compares two TDateTime values (returns "less", "equal" or "greater"). Ignores the Date part if both values occur at the same time.
Date function
Returns the current system date.
DateToStr function
Converts a TDateTime value to a string (date part only).
Converts a TDateTime value to a system timestamp value.
DateTimeToStr function
Converts a TDateTime value to a string (date and time).
DateOfWeek function
Returns the day of the week for a given date.
DateOfTheWeek function
Returns the day of the week for a given TDateTimeValue.
DayOfTheMonth function
Returns the day of the month from a given TDateTime value (from 1 to 31)
DayOfTheYear function
Returns the the ordinal position of a TDateTime value's day within its year.
DaySpan function
Gives the number of days (including fractional days) between two specified dates.
DaysBetween function
Gives the number of whole days between two specified dates.
DateOf function
Returns only the Date portion of the TDateTime value, by setting Time part to 0.
DecodeDate function
Separates Year, Month, and Day values from a TDateTime value.
DecodeTime procedure
Separates Hour, Minute, Second, and MilliSecond values from a TDateTime value.
EncodeDate function
Creates a TDateTime value from Year, Month, and Day values.
EncodeTime function
Creates a TDateTime value from Hour, Min, Sec, and MSec. values.
FormatDateTime function
Formats a TDateTime value to a string.
HourOf function
Returns the hour of the day represented by a TDateTime value.
IncDay function
Adds or substracts a given number of days from a date value.
IncMonth function
Adds or substracts a given number of months from a date value.
IsLeapYear function
Returns True if a year specified is a leap year.
IsPM function
Returns true if the time portion of a TDateTime value occurs on or after 12:00 (noon) and before 24:00 (midnight).
Now function
Returns the current system date and time.
Time function
Returns the current system time.
TimeToStr function
Converts a TDateTime value to a string (time part).
TimeOf function
Returns only the Time portion of the TDateTime value, by setting Date part to 0.
WithinPastDays function
Returns true if two dates are within a specified number of days of each other.
WithinPastYears function
Returns true if two dates are within a specified number of years of each other.
YearsBetween function
Gives the number of whole years between two specified dates.
more to come...



sumber:

http://delphi.about.com/od/beginners/l/blrtldatetime.htm

No comments:

Post a Comment