Re: how to get year month day from two dates
- From: ThanksButNo <no.no.thanks@xxxxxxxxx>
- Date: Sat, 08 Sep 2007 02:14:46 -0000
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. <:-(
.
- References:
- how to get year month day from two dates
- From: Ricardo Rios
- how to get year month day from two dates
- Prev by Date: Re: Hardware recommendation for hosting Sybase 12.5; 15
- Next by Date: how do i load a database split in to many files
- Previous by thread: how to get year month day from two dates
- Next by thread: Re: how to get year month day from two dates
- Index(es):