# Easily perform calculations using dates with the new DATEDIF function

Hey Zoho Writer users!

We've enhanced Zoho Writer's formula capabilities with the new DATEDIF function. This allows you to calculate the difference between dates in days, months, and years.

Function syntax:

=DATEDIF(start_date, end_date, unit)

Inputs:
 start_date The date from which the calculation begins end_date The date till which the calculation is needed unit The format (day, month, year) in which the difference should be calculated.

You can also have the start_date and end_date as a merge field or an auto-date field.

List of supported units:

 Unit Description Y Calculates the difference in years M Calculates the difference in months D Calculates the difference in days MD Calculates the difference in days, excluding months and years YM Calculates the difference in months, excluding years YD Calculates the difference in days excluding years

D(Days) will be used as the default unit if no unit is specified.
DATEDIF returns the difference as an integer.

How to insert a DATEDIF function in Zoho Writer:

1. Click the hamburger menu located on the top left side of the editor and click Fields.
2. Click Formula located under the Dynamic Fields category.
3. In the popup, click Choose Function and choose DATEDIF from the list of functions.

Here are some examples of the DATEDIF function:

 Example Syntax Output Calculate the difference between Dec. 28, 2023 and Feb. 28, 2024 in months =DATEDIF([28/12/2023], [28/02/2024],"M") 2 Calculate the difference between Jan. 15, 2024 and March 16, 2024 in days, excluding months and years =DATEDIF([15/01/2024], [16/03/2024],"MD") 1 (Because the difference is 1 day and 2 months, this formula returns 1 day) Calculate the difference between Feb. 20, 2023 and April 20, 2024 in months excluding years =DATEDIF([20/02/2023], [22/04/2024],"YM") 2 (Because the difference is 1 year and 2 months, this formula returns 2 months)

Please ensure the end_date is greater than the start_date.
To use the DATEDIF function in Writer's merge templates please make sure the field type is date and configured in a date format supported in Zoho Writer.

A real-world example:

Let's say you're sending reminder emails to your event attendees mentioning the number of days until the event. The DATEDIF function allows you to easily insert this number without doing the calculations manually.

Try the new DATEDIF function in Zoho Writer and let us know your suggestions and feedback in the comments section below or email us at support@zohowriter.com or support@eu.zohowriter.com.

If you have any function that you want us to add in Zoho Writer, please let us know in the comments.

Regards,
Team Writer

# Zoho Developer Community

New to Zoho Survey?

Zoho Desk Resources

• Desk Community Learning Series

• Digest

• Functions

• Meetups

• Kbase

• Resources

• Glossary

• Desk Marketplace

• MVP Corner

• Word of the Day

Zoho SalesIQ Resources

Manage your brands on social media

Zoho Pagesense Resources

# Zoho CRM Resources

• CRM Community Learning Series

• Tips

• Functions

• Meetups

• Kbase

• Resources

• Digest

• CRM Marketplace

• MVP Corner

Design. Discuss. Deliver.

Create visually engaging stories with Zoho Show.

# Zoho Show Resources

Writer

# Get Started. Write Away!

Writer is a powerful online word processor, designed for collaborative work.

Zoho CRM コンテンツ