Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
i have a one product table
table:
start_date end_date
12/03/2013 12/03/2015
09/11/2013 12/02/2019
25/09/2013 12/08/2020
05/06/2013 12/12/2015
how to calculate current date in between st_date and end_date..
based on start and end dates..
using where condition (scripting level)
Thanks in Advance......
Maybe like
Set DateFormat = 'DD/MM/YYYY';
LOAD * INLINE [
start_date, end_date
12/03/2013, 12/03/2015
09/11/2013, 12/02/2019
25/09/2013, 12/08/2020
05/06/2013, 12/12/2015
05/06/2013, 11/09/2013
31/12/2013, 01/01/2020
]
where start_date <= today() and end_date >= today() ;
Thanks for reply,
one more how to calculate how many years and months validity
HI,
Try like this
=Year(end_date) - Year(start_date)
Regards,
Jagan.
Hi,
Can you give some more details, because current date will be today () but you are asking between St_Date and End_Date.
What if we do not have current date between those ranges?
What are you planing to get out of that?
Regards,
NR
Hi jagan,
i want months alsoo..
Hi,
Try like this
=Floor((Year(end_date) *12 - Year(start_date) * 12) /12) & ' Years ' & Mod(((Year(end_date) *12 - Year(start_date) * 12) ), 12) & ' Months'
Regards,
Jagan.