Fowler, Jeff wrote:
Hello All,
SQLite newbie here. I've looked through the email archives and website
trying to find out how to compute the difference in months between two
given dates. Each date is in -MM-DD HH:MM:SS format.
The best I've been able to come up with seems rather ugly:
: RE: [sqlite] Date arithmetic question
Guys,
I guess I'm the newest SQLite person on this email list and I
know I'm definitely the dumbest. It seems like a lot of you
are trying to justify why two dates that are one minute apart
can have a function say they're one month apart. Don't look
[EMAIL PROTECTED] wrote:
Virgilio Fornazin [EMAIL PROTECTED] wrote:
DATEDIFF should compute the difference by arithmetic subtracting M/Y in
month case, if I'm not wrong
ex:
DateDiff (month, 1-1-2007, 3-30-2007) will return 2
Its that right ?
So datediff('month', '2008-02-01
On Thu, 17 Jan 2008, [EMAIL PROTECTED] wrote:
Virgilio Fornazin [EMAIL PROTECTED] wrote:
DATEDIFF should compute the difference by arithmetic subtracting M/Y in
month case, if I'm not wrong
ex:
DateDiff (month, 1-1-2007, 3-30-2007) will return 2
Its that right ?
So datediff('month',
] Date arithmetic question
Guys,
I guess I'm the newest SQLite person on this email list and I know I'm
definitely the
dumbest. It seems like a lot of you are trying to justify why two dates
that are one
minute apart can have a function say they're one month apart. Don't look
at it that
way
Fowler, Jeff [EMAIL PROTECTED] wrote:
Yes - I've looked over the current date functions. I would propose a
single function addition that's hugely valuable in the business world.
SQL Server has a function called datediff for date arithmetic. It
accepts three parameters. The first indicates the
Fowler, Jeff [EMAIL PROTECTED] wrote:
Hello All,
SQLite newbie here. I've looked through the email archives and website
trying to find out how to compute the difference in months between two
given dates. Each date is in -MM-DD HH:MM:SS format.
The best I've been able to come up with
@sqlite.org
Subject: Re: [sqlite] Date arithmetic question
Fowler, Jeff [EMAIL PROTECTED] wrote:
Hello All,
SQLite newbie here. I've looked through the email archives and website
trying to find out how to compute the difference in months between two
given dates. Each date is in -MM-DD
DATEDIFF should compute the difference by arithmetic subtracting M/Y in
month case, if I'm not wrong
ex:
DateDiff (month, 1-1-2007, 3-30-2007) will return 2
Its that right ?
A good reference for trying implementing it should be:
http://www.sqlteam.com/article/datediff-function-demystified
-
From: Scott Baker [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 17, 2008 3:13 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Date arithmetic question
Fowler, Jeff wrote:
Yes - I've looked over the current date functions. I would propose a
single function addition that's hugely
Fowler, Jeff wrote:
Yes - I've looked over the current date functions. I would propose a
single function addition that's hugely valuable in the business world.
SQL Server has a function called datediff for date arithmetic. It
accepts three parameters. The first indicates the unit of scale
Not really that goofy, just very specific.
The SQL Server manual describes it this way:
Returns the number of date and time boundaries crossed between two
specified dates.
Regards,
Noah Hart
-Original Message-
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should
[EMAIL PROTECTED] writes:
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should
return 1 even though the difference is really only 1 second? Seems
goofy to me
well, this is one second rounded up to the next full month...If that
is the kind of information you want
. It computes the number of date measurement
interval transitions that occur between the two dates.
-Original Message-
From: Markus Hoenicka [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 17, 2008 3:47 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Date arithmetic question
[EMAIL
:47 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Date arithmetic question
[EMAIL PROTECTED] writes:
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00')
should return 1 even though the difference is really only 1 second?
Seems goofy to me
well, this is one second
Virgilio Fornazin [EMAIL PROTECTED] wrote:
DATEDIFF should compute the difference by arithmetic subtracting M/Y in
month case, if I'm not wrong
ex:
DateDiff (month, 1-1-2007, 3-30-2007) will return 2
Its that right ?
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00')
PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Date arithmetic question
[EMAIL PROTECTED] writes:
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00')
should return 1 even though the difference is really only 1 second?
Seems goofy to me
well
[EMAIL PROTECTED] wrote:
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should
return 1 even though the difference is really only 1 second? Seems
goofy to me
I have been staring at this until I'm getting goofy.
Written as it is, isn't the time interval 1 second
Gerry Snyder [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') should
return 1 even though the difference is really only 1 second? Seems
goofy to me
I have been staring at this until I'm getting goofy.
this would be useful for some of us. We do have a vested
interest in the product!
- Jeff
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thu 1/17/2008 9:21 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Date arithmetic question
Gerry Snyder
20 matches
Mail list logo