Date & Time

Top  Previous  Next

 

These functions are related to getting the date or time, or manipulating date or time values.

 

 

 

(Back to Function Types List)

 

 

 

Function:D        
Result-type:Date/Time        
Arguments:eExpression        
Description:Forces an 'Unknown' expression to look like a date/time expression -- it won't necessarily do conversion, it's simply used to satisfy argument type verifications where a function is used that returns an 'Unknown' type inside a function that requires a 'dDate' argument        

 

 

Function:Date        
Result-type:Date/Time        
Arguments:[nYear, nMonth, nDay]        
Description:Returns the current date if no arguments, else converts the numeric year, month and day into a date value        

 

 

Function:DatePeriodRangesOverlap        
Result-type:Boolean        
Arguments:dFromDate1, nFromPeriod1, dToDate1, nToPeriod1, dFromDate2, nFromPeriod2, dToDate2, nToPeriod2        
Description:Returns True if there are any common dates/periods between the From & To date/period ranges        

 

 

Function:DateRangesOverlap        
Result-type:Boolean        
Arguments:dFromDate1, dToDate1, dFromDate2, dToDate2        
Description:Returns True if there are any common dates between the From & To date ranges        

 

 

Function:DateTime        
Result-type:Date/Time        
Arguments:[nYear, nMonth, nDay [, nHours [, nMinutes [, nSeconds]]]]        
Description:Returns the current date and time if no arguments, else converts the numeric year, month and day into a date value, optionally with the time values also specified for a date/time value. If time values are specified but the date values are all 0, then the current date is used.        

 

 

Function:DateToLongText        
Result-type:Text        
Arguments:dDate [, 1]        
Description:Returns the date in text form 'yyyymmdd' if the second argument is 1, otherwise formats the date using the national language specifications (locale IDs) for date/time according to the Windows settings        

 

 

Function:DateToShortText        
Result-type:Text        
Arguments:dDate        
Description:Converts a Date into text, in the same format that FieldText() would return for a date field -- e.g. m/d/y or d/m/y        

 

 

Function:DateToText        
Result-type:Text        
Arguments:dDate        
Description:Converts a Date into text, in the system-specified Date Format (Program Options / Formats)        

 

 

Function:DateToTextYear        
Result-type:Text        
Arguments:dDate        
Description:Converts a Date into text, in the system-specified Date Format (Program Options / Formats), but also forces it to include the year        

 

 

Function:Day        
Result-type:Numeric        
Arguments:dDate        
Description:Returns the numeric day of the dDate given        

 

 

Function:Days        
Result-type:Numeric        
Arguments:dToDate, dFromDate        
Description:Returns the number of days between the dates given (like subtracting dates, so it returns 0 if both the same date).  The "to" date should be first, e.g. : Days(ToDate(),FromDate())

 

 

Function:DMY        
Result-type:Text        
Arguments:dDate        
Description:Returns the date in the text form 'd mmm yyyy', for instance '8 July 2005'        

 

 

Function:DoW        
Result-type:Numeric        
Arguments:dDate        
Description:Returns the numeric day of the week for the dDate given (1 = Sunday, 7 = Saturday)        

 

 

Function:DOWText        
Result-type:Text        
Arguments:dDate        
Description:Returns the day of the week for dDate, as text        

 

 

Function:FieldDate        
Result-type:Date/Time        
Arguments:rRecord, cFieldName        
Description:Gets the date for the given field of a record. Will return a NULL value if the field is not normally a date value        

 

 

Function:FieldTime        
Result-type:Date/Time        
Arguments:rRecord, cFieldName        
Description:Gets the time for the given field of a record. Will return a NULL value if the field is not normally a time value        

 

 

Function:FormatDateTime        
Result-type:Text        
Arguments:cFormat, dValue        
Description:Formats a date/time value to text using the cFormat specification.  Details are in the FormatDateTime specifications topic.        

 

 

Function:GoMonth        
Result-type:Date/Time        
Arguments:dDate, nMonths        
Description:Adds or subtracts a given number of months from the date. Won't overshoot months, for instance Jan 31st + 1 month = Feb 28th        

 

 

Function:Hour        
Result-type:Numeric        
Arguments:dTime        
Description:Returns the numeric hour for the given date/time value, 0 to 23        

 

 

Function:MDY        
Result-type:Text        
Arguments:dDate        
Description:Returns the date in the text form 'mmm d, yyyy', for instance 'July 8, 2005'        

 

 

Function:Minute        
Result-type:Numeric        
Arguments:dTime        
Description:Returns the numeric minute for the given date/time value, 0 to 59        

 

 

Function:Month        
Result-type:Numeric        
Arguments:dDate        
Description:Returns the numeric month of the dDate given        

 

 

Function:MonthText        
Result-type:Text        
Arguments:dDate        
Description:Returns the month name as text        

 

 

Function:Second        
Result-type:Numeric        
Arguments:dDateTime        
Description:Returns the numeric value of the second in the given time        

 

 

Function:SecondsInDate        
Result-type:Numeric        
Arguments:[dTime]        
Description:The total number of seconds in the current date/time (or a given date/time) since Jan 1st, 1971. Mainly useful for comparison purposes or time-tagging        

 

 

Function:TextToDate        
Result-type:Date/Time        
Arguments:cDate        
Description:Converts a text date into a date/time value        

 

 

Function:TextToTime        
Result-type:Date/Time        
Arguments:cTime        
Description:Converts a text time into a date/time value        

 

 

Function:ThisDate        
Result-type:Date/Time        
Arguments:(none)        
Description:Returns the current date of interest, if used where there's a specific date we're to be evaluating an expression for (e.g. in a summary report or color scheme)        

 

 

Function:ThisFromDate        
Result-type:Date/Time        
Arguments:(none)        
Description:Returns the 'From' date of interest, if used where there's a specific date range we're to be evaluating an expression for (e.g. in a list report)        

 

 

Function:ThisFromPeriod        
Result-type:Numeric        
Arguments:(none)        
Description:Returns the 'From' period of interest, if used where there's a specific date and period range we're to be evaluating an expression for (e.g. in a list report)        

 

 

Function:ThisPeriod        
Result-type:Numeric        
Arguments:(none)        
Description:Returns the current period of interest, if used where there's a specific date and period we're to be evaluating an expression for (e.g. for a color scheme)        

 

 

Function:ThisToDate        
Result-type:Date/Time        
Arguments:(none)        
Description:Returns the 'To' date of interest, if used where there's a specific date range we're to be evaluating an expression for (e.g. in a list report)        

 

 

Function:ThisToPeriod        
Result-type:Numeric        
Arguments:(none)        
Description:Returns the 'To' period of interest, if used where there's a specific date and period range we're to be evaluating an expression for (e.g. in a list report)        

 

 

Function:Time        
Result-type:Text        
Arguments:(none)        
Description:Returns the current time as text        

 

 

Function:TimeToText        
Result-type:Text        
Arguments:dTime        
Description:Converts a Time value into text, in the default time format, e.g. HH:MM AM. The time value is actually a date/time value, but the date is ignored. For instance, you can use DateTime() to get the current time as an argument.        

 

 

Function:Today        
Result-type:Date/Time        
Arguments:(none)        
Description:Returns the current date        

 

 

Function:WeekdayName        
Result-type:Text        
Arguments:nDayOfTheWeek [, fAbbreviate]        
Description:Returns the day of the week represented by the numeric day of the week, as text, optionally abbreviating (1 = 'Sunday' or 'Sun')        

 

 

Function:Year        
Result-type:Numeric        
Arguments:dDate        
Description:Returns the numeric year of the dDate given        

 

 

 

 


Page URL https://CampgroundMaster.com/help/datetime.html

Campground Master Home