WinVask -  Faktura

Dictionary: Date/Time Functions

Dictionary: Date/Time Functions

Previous topic Next topic  

Dictionary: Date/Time Functions

Previous topic Next topic  

frb_bm14

 

This portion of the Dictionary provides access to built-in functions that manipulate date or time data types:

 

ð        TODAY() - Returns the operating system date as a standard date. The range of possible dates is from January 1, 1801 (standard date 4) to December 31, 2099 (standard date 109,211). You can use a picture command to change the appearance of the return value. For example, cToday = format( TODAY(), @d01B )
ð        CLOCK() - Returns the current time based upon your pc bios time.
ð        DATE() - Returns a standard date for a given month, day, and year. The month and day parameters do allow positive out-of-range values (zero or negative values are invalid). A month value of 13 is interpreted as January of the next year. A day value of 32 in January is interpreted as the first of February. Consequently, DATE(12,32,97), DATE(13,1,97), and DATE(1,1,98) all produce the same result. The century for a two-digit year parameter is resolved using the default "Intellidate" logic, which assumes the date falls in the range of the next 20 or previous 80 years from the current operating system date. For example, assuming the current year is 1998, if the year parameter is "15," the date returned is in the year 2015, and if the year parameter is "60," the date returned is in 1960.
For example, HireDate = DATE(Hir:Month,Hir:Day,Hir:Year); FirstOfMonth = DATE(MONTH(TODAY()),1,YEAR(TODAY())) would compute the first  day of month
ð        DAY() - Returns day of month. Computes the day of the month (1 to 31) for a given standard date. For example, OutDay = DAY(TODAY()) to get the day from today's date; DueDay = DAY(TODAY()+2)  to calculate the return day
ð        MONTH() - Returns the month of the year (1 to 12) for a given standard date. For example, PayMonth = MONTH(DueDate) to get the month from the date
ð        YEAR() - Returns a four digit number for the year of a standard date (1801 to 9999). For example, YEAR( today() )
ð        AGE() - Returns a string containing the time elapsed between two dates. The age return string is in the following format: 1 to 60 days - 'nn DAYS'; 61 days to 24 months - 'nn MOS';  2 years to 999 years - 'nnn YRS'. For example, nAge = AGE( EMP:Birthday, TODAY()) would compare the database field EMP:Birthday against the computer date to return the persons age.

 

To select a Dictionary item you can either double left click the mouse on an item or click the checkmark icon at the top left of the window (after highlighting your desired choice).