Re: Informix date functions help
Posted in 2005
bozon wrote: > Oh yeah here are Jonathan's explains while I am at it. Notice that they > also would clearly use an index: > > I just have one question: Why would adding units day make Informix work > harder? I thought that was the default action when you wrote "- 1" with > dates? So, I am curious about what is actually happening. Well a DATE value is stored as a simple INTEGER, and a DATETIME is stored as an encoded DECIMAL. So a -1 is a simple operation on a DATE value. However, as Jonathan said, "The 1 UNITS MONTH is unfortunate but simple; it is unfortunate because it converts the date to DATETIME, does the difference and then converts back to DATE." You can substitute DAY for MONTH in that explanation. ;-) Cheers, -- Mark. +----------------------------------------------------------+-----------+ | Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /| | |///// / //| | +-----------------------------------+//// / ///| | |We value your comments, which have |/// / ////| | |been recorded and automatically |// / /////| | |emailed back to us for our records.|/ ////////| +----------------------+-----------------------------------+-----------+ -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.11/191 - Release Date: 02/12/2005 sending to informix-list