2601
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).
AddDays( date, -90 )
This is really cool!! thanks Joop!

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

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

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


Any idea?


show your expression Patrick.

mvp_badge
MVP

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

Is there a function to subtract days from 2 dates?

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

mvp_badge
MVP

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

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.


mvp_badge
MVP

Hope you are enjoying it.

Anything you need just ask on the forum.

Have fun

Regards,

Marcelo

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 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


Hi Claudia, 

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

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..

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