4456
Views
15
Comments
Solved
Subtract days from date
Question
Is there a function to subtract days from a date? For example, I want something like CurrDate() - 90, or SubtractDays(CurrDate(), 90).
2011-06-15 10-51-22
Joop Stringer
Solution
AddDays( date, -90 )
2021-06-21 09-08-42
Simone
This is really cool!! thanks Joop!
UserImage.jpg
Gonzalo Labarca

I am trying to do the same, but when I enter "AddDays(Curredate(), -90)" is not accepted

2012-03-16 12-21-09
João Rosado
Staff

Hi Gonzalo,


You have a typo there. its CurrDate() and not "Curredate()".

Is that the problem or was just writing it here on the forum?


Regards,
João Rosado

UserImage.jpg
Patrick W

I have the same issue and the error "Unexpected ',' in expression"


Any idea?


2016-07-12 16-07-47
Jorge Almeida

show your expression Patrick.

2020-02-28 09-46-54
Eduardo Jauch

Patrick, please, show your expression, but in a new topic.
Let's not wake the dead ;)

2019-06-02 09-04-06
Ayu Andini

Is there a function to subtract days from 2 dates?

for example 2019/6/7 - 2019/6/6 = 1

2019-05-22 11-30-09
Marcelo Ferreira

Hi,

You have the diffdays action. Check here all the date actions.

Btw normally is better to open a new post than revive a very old one.

Regards,

Marcelo

2019-06-02 09-04-06
Ayu Andini

Marcelo Ferreira wrote:

Hi,

You have the diffdays action. Check here all the date actions.

Btw normally is better to open a new post than revive a very old one.

Regards,

Marcelo

Hello Marcelo,

Thanks for the reply, 

I just started studying outsystem.


2019-05-22 11-30-09
Marcelo Ferreira

Hope you are enjoying it.

Anything you need just ask on the forum.

Have fun

Regards,

Marcelo

UserImage.jpg
Cláudia Dias

I have one question about that topic.

When I use AddDays(DateCounter,-1) were supposed to subtract one day from de DateCounter, right? I did it and the expression was accepted but browser doesn't open.


Thanks

2019-04-09 00-57-55
carl ruhle

Cláudia Dias wrote:

I have one question about that topic.

When I use AddDays(DateCounter,-1) were supposed to subtract one day from de DateCounter, right? I did it and the expression was accepted but browser doesn't open.


Thanks

Cláudia,

what do you mean the "browser doesn't open"?

The datacounter is a variable of date type right?

The return is a date-time variable and not a date variable


2020-09-21 08-42-47
Vincent Koning

Hi Claudia, 

Please create a new topic for you question. This thread is almost over 2 years old. 

2021-06-04 06-00-18
KIRAN GURUNG

Hello Everyone...I'm new to Outsystems and this might be an old post
but if anyone could help me out about the same topic..to get 3 days from todays

I tried to use following..
·AddDays(#2021-08-24#, 3)?This showed syntax error
·AddDays(Date,3)?This was not accepted

Thank You all in advance..

2022-07-11 07-38-06
Askeladd

Hi Kiran, should be like this AddDays(CurrDate(),3) 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.