GetAsDate
Purpose
Returns dates in text as field type date.
Format
GetAsDate(text)
Parameters
text - any
text expression or text
field containing text in the same format as the date on the system where the file was created
Data type returned
date
Originated in
FileMaker Pro 6.0 or earlier
Description
Use with formulas involving dates or date functions; use the GetAsDate or Date function to enter a date
constant into a
formula. The format of
text date must be the same as the date format on the system where the file was created.
You can also use this function to convert the number of days to a date. If you specify a number as the parameter, it has to be between 1 (for 1/1/0001) and 1460970 (for 12/31/4000).
Important To avoid errors when using dates, always use four-digit years. For more information about how FileMaker Pro handles two-digit dates, see
Entering dates with two-digit years.
Notes
•If the function returns a number instead of a date, go to the Specify Calculation dialog box and make sure the Calculation result is date.
Examples
GetAsDate ( "03/03/2019" ) returns
3/3/2019. You can perform date operations on this result using the
Date function.
GetAsDate ( 737342 ) returns 10/10/2019. The number 737342 specifies the number of days since 1/1/0001.
Use the following formula to determine the number of days elapsed between values in two timestamp fields:
GetAsDate ( EndDate ) - GetAsDate ( StartDate ) returns 90 if the value in the field EndDate is 4/1/2019 1:00 AM and the value in the field StartDate is 1/1/2019 11:15 PM.
Related topics