Issue Details (XML | Word | Printable)

Key: CORE-1490
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Helen Borrie
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Firebird Core

New builtin function DATEDIFF() implements wrong choice of keywords for expanded syntax

Created: 01/Oct/07 11:14 AM   Updated: 19/Jan/16 05:01 AM
Component/s: Engine
Affects Version/s: 2.1 Beta 1
Fix Version/s: 2.1 RC1

Environment: All; affects Fb 2.1 Betas 1 and 2

QA Status: No test

 Description  « Hide
The expanded syntax for the newly-implemented built-in function is as follows:

DATEDIFF( <timestamp_part> FROM <date_time> FOR <date_time> )

Use of the prepositions FROM and FOR as keywords conveys the wrong semantics. The meaning should be expressed by a semantically correct pair of prepositions.

DATEDIFF( <timestamp_part> FROM <date_time> TO <date_time> )

DATEDIFF( <timestamp_part> BETWEEN <date_time> AND <date_time> )

A contracted alternative syntax is available, sans prepositions:

DATEDIFF( <timestamp_part>, <date_time>, <date_time> )

As a temporary measure, the Beta 2 release notes will include a warning that the keywords will change in Beta 3 and recommending use of the contracted syntax for the time being.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 02/Oct/07 11:38 AM
Changed TO: DATEDIFF( <timestamp_part> FROM <date_time> TO <date_time> )