#1 2017-08-01 08:38:30

shivam_p
Member
Registered: 2017-08-01

Adding Days to Start Date ( Date Parameter) to get End Date-next week

I am using Date Paramer, I have input start date parameter as STDT, now, in my query, I am giving date to be in between ${STDT} and ${STDT +7} for a week ahead. How should I correct this- ${STDT +7}?

Offline

#2 2017-08-01 09:05:55

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Adding Days to Start Date ( Date Parameter) to get End Date-next week

Hi shivam_p,

you can use your db-standard ways of adding dates. For example, if you are using mysql, you could use DATE_ADD()

Regards,
Eduardo

Offline

#3 2017-08-01 09:08:14

shivam_p
Member
Registered: 2017-08-01

Re: Adding Days to Start Date ( Date Parameter) to get End Date-next week

Hii Eduardo, thanks for your reply. I am just trying the DATE_ADD(), How can i use ${STDT} in that?

Offline

#4 2017-08-01 10:59:37

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Adding Days to Start Date ( Date Parameter) to get End Date-next week

Hi shivam_p,

try with
DATE_ADD(${STDT}, INTERVAL 7 DAY)

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB