Date
Function Details
Dates
Date
(Number year, Number month, Number day)
Date
Creates a date from a year, month and day.
Date(2000, 1, 10) returns the date January 10, 2000
Sample Problems and Formulas
Problem
Description
Category
Solution
Solution in English
Discussion
Formula Field Type
Alternate Solution
 
Find the duration between two date fields of different types Actual Finish is a date field and Actual Start is a workdate field. How can I find the duration between them without getting a type mismatch error? Type Conversion [Actual Finish]-ToDate([Actual Start]) Convert the value in the Actual Start field to a date type value. Then subtract that date from the Actual Finish date   Duration  
Dynamically adjusting successor start dates from predecessor changes Related to Project Management application Calculation If( ([Status]<>"Completed"),WeekdayAdd([Start], [Duration]),
 ToWorkDate([Actual Finish Date])  )

The predecessor field (under properties) needs to be changed from formula builder to Type-In.
If the task is not completed, it calculates the expected end date (by adding the amount of time it will take to when it starts), and if the task is completed, then it uses the date that it was actually finished, as entered by the user completing the task.   Workdate  
Find duration between two dates Find the length of time between the date a record is created and the date the record's marked complete. Dates ToDays([Actual Finish Date] - ToDate([Date Created])) Take the value in the Date Created field (Date / Time type field) and convert it to a date value. Then subtract that date from the Actual Finish Date. Convert the resulting duration to a number of days. You must convert the this formula result to days to make it data type numeric.

If your result field type if formula-duration instead try:
[Actual Finish Date] - ToDate([Date Created])
Numeric If both dates live in Date type fields you can use a much simpler formula: [Actual Finish Date] - [Start Date]
Show fields from Show fields from Show fields from a related table