# Calculate a date a year from given date

**URL:** <https://clarionhub.com/t/calculate-a-date-a-year-from-given-date/7851>\
**Category:** questions\
**Tags:** language\
**Created:** [January 22, 2025, 6:30am UTC](https://clarionhub.com/t/calculate-a-date-a-year-from-given-date/7851 "2025-01-22T06:30:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tonymarshall](https://clarionhub.com/user_avatar/clarionhub.com/tonymarshall/32/3786_2.png) [@Tonymarshall](https://clarionhub.com/u/Tonymarshall)\
**Post date:** [January 22, 2025, 6:30am UTC](https://clarionhub.com/t/calculate-a-date-a-year-from-given-date/7851/1 "2025-01-22T06:30:21Z")

</div>

Hi there

Can you please tell me what the formula is to calculate a date a year from a given date.

Many thanks

---

<div class="post-metadata">

**Author:** ![Marius\_Nel](https://clarionhub.com/user_avatar/clarionhub.com/marius_nel/32/2309_2.png) [@Marius\_Nel](https://clarionhub.com/u/Marius_Nel)\
**Post date:** [January 22, 2025, 6:55am UTC](https://clarionhub.com/t/calculate-a-date-a-year-from-given-date/7851/2 "2025-01-22T06:55:52Z")

</div>

Hi,

Hope this helps?

Loc:Date LONG

MONTH(Loc:Date) = MONTH NUMBER eg 1-12  
DAY(Loc:Date) = DAY eg. 1-31  
YEAR(Loc:Date) = YEAR eg 1809 …

---

<div class="post-metadata">

**Author:** ![vitesse](https://clarionhub.com/user_avatar/clarionhub.com/vitesse/32/837_2.png) [@vitesse](https://clarionhub.com/u/vitesse)\
**Post date:** [January 22, 2025, 9:49am UTC](https://clarionhub.com/t/calculate-a-date-a-year-from-given-date/7851/3 "2025-01-22T09:49:23Z")

</div>

expanding a little on what Marius\_Nel said:

```auto
givenDate long ! some given date
plusYear long ! the given date plus a year

  code
  plusYear = date(month(givenDate), day(givenDate), year(givenDate)+1)

```

you may need to consider if given date is February 29th, do you want Feb 28th or Mar 1st in the following year.

cheers

Geoff R

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [January 23, 2025, 3:26am UTC](https://clarionhub.com/t/calculate-a-date-a-year-from-given-date/7851/4 "2025-01-23T03:26:09Z")

</div>

This tool has a Date Calculations tab to try the calculation without writing code and see it work. You can add 1 year using the DATE() function as Geoff showed.

> **[GitHub - CarlTBarnes/Date-Time-Number-Tool: Clarion Date Time Number and Picture Tool](https://github.com/CarlTBarnes/Date-Time-Number-Tool?tab=readme-ov-file#date-calculations)**
>
> Clarion Date Time Number and Picture Tool

---

<div class="post-metadata">

**Author:** ![Tonymarshall](https://clarionhub.com/user_avatar/clarionhub.com/tonymarshall/32/3786_2.png) [@Tonymarshall](https://clarionhub.com/u/Tonymarshall)\
**Post date:** [January 23, 2025, 6:47am UTC](https://clarionhub.com/t/calculate-a-date-a-year-from-given-date/7851/5 "2025-01-23T06:47:36Z")

</div>

Hi Carl.  
Thanks so much for your input. I am a newbie at Clarion and using version 8. I need to calculate the date for a field.

I wrote a servicing program and need to return the anniversary date to that field. Don’t know how your app will help.

Once again thanks very much for your help.
