Re: how to get year month day from two dates



On Sep 2, 10:21 am, Ricardo Rios <lord.tyranus...@xxxxxxxxx> wrote:
Hi wizards, I need to get the difference between FEC_INICIO AND
FEC_FIN , but it must be expresed how year , month and day.

For Example:

FEC_INICIO = 31/08/2006
FEC_FIN = 02/09/2007

The result must be : 1 year, 0 month, 2 days

Thanks in advance.

Well --

You can select datediff(year, date1, date2)
datediff(month, date1, date2)
datediff(day, date1, date2)

But you'll have to do all the necessary arithmetic with it. Or pass
the dates into a application program that does the arithmetic.

There's no other way I know of. <:-(

.