![](https://secure.gravatar.com/avatar/f174b9816ccce31bf5cdb49501b15358.jpg?s=120&d=mm&r=g)
Hello
Could you please advise what I am doing wrong with my date selection process. I have a field called visitdate. Format = dd/mm/yyyy. The field itself is OK because FREQ visitdate works fine. My problem is when I try to select dates less than 1 July ( 01/07/2008)
When I try select visitdate < "01/07/2008" I get an error message "Type Date is incompatible with type String operation aborted"
When I try select visitdate < 01/07/2008 I get an error message "Type Date is incompatible with type Float Operation aborted"
The only way I could find in the end was to use the month function to create a new field called visitmonth from visitdate and then select visit month <7. This worked, but I want to be able to select on the original visitdate field. Could someone help please?
thanks
Christine
Christine Roseveare Analyst Regional Public Health 570 9194 027 495 9671
epidata-list-request@lists.umanitoba.ca 29/11/2007 7:02 a.m. >>>
Send EpiData-list mailing list submissions to epidata-list@lists.umanitoba.ca
To subscribe or unsubscribe via the World Wide Web, visit http://lists.umanitoba.ca/mailman/listinfo/epidata-list or, via email, send a message with subject or body 'help' to epidata-list-request@lists.umanitoba.ca
You can reach the person managing the list at epidata-list-owner@lists.umanitoba.ca
When replying, please edit your Subject line so it is more specific than "Re: Contents of EpiData-list digest..."
![](https://secure.gravatar.com/avatar/f174b9816ccce31bf5cdb49501b15358.jpg?s=120&d=mm&r=g)
epidata-list@lists.umanitoba.ca wrote:
Hello
Could you please advise what I am doing wrong with my date selection process. I have a field called visitdate. Format = dd/mm/yyyy. The field itself is OK because FREQ visitdate works fine. My problem is when I try to select dates less than 1 July ( 01/07/2008)
The easiest way to do this is by using the dmy() or date() functions.
Then the correct syntax would be: select visitdate < dmy(01,07,2008) or select visitdate < date("01/07/2008","dmy")
Kind regards, Torsten Bonde Christiansen Software Developer, EpiData.
participants (1)
-
epidata-list@lists.umanitoba.ca