Find on a datetime field.

Questions, answers, tips and ideas on Servoy Client

Find on a datetime field.

Postby lhale » Tue Nov 10, 2009 11:04 pm

I am having a time trying to do a find on a date portion of a datetime field. :x In servoy client I do the following in the date time field:

1. Ctrl+F
2. #11/09/09(this is the format of the date portion of the datetime field MM-dd-yy)
3. enter (nothing happens and I get a empty foundset)

Servoy docs say to use the # symbol and the date to do find on a datetime field. If I use //,now, or today I get the correct data for the current day. However, if I use the above syntax for non current days or ranges nothing happens. Thanks in advance for all your help.
lhale
 
Posts: 108
Joined: Mon Mar 17, 2008 3:49 pm

Re: Find on a datetime field.

Postby Harjo » Wed Nov 11, 2009 11:06 am

and if you try this:

Code: Select all
#11/09/09|MM-dd-yy
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Find on a datetime field.

Postby lhale » Wed Nov 11, 2009 3:39 pm

#11/09/09|MM-dd-yy did not work. When using # symbol or a specific date I get an empty foundset. I can do finds on date fields just fine. What would cause this not to work on datetime fields. I disabled my default error handler and received the attached error.
error.JPG
error.JPG (12.11 KiB) Viewed 3401 times
lhale
 
Posts: 108
Joined: Mon Mar 17, 2008 3:49 pm

Re: Find on a datetime field.

Postby lhale » Wed Nov 11, 2009 4:05 pm

Fixed. You have to use the following format:


specific day:

#11/09/09|MM/dd/yy or #11-09-09|MM-dd-yy :D


search for dates greater than or equal to enterd date:

>=11/10/09|MM/dd/yy *** notice that I do not use the # symbol
lhale
 
Posts: 108
Joined: Mon Mar 17, 2008 3:49 pm

Re: Find on a datetime field.

Postby Harjo » Fri Nov 13, 2009 1:41 am

ah sorry, yes I did make a typo!
you need to use on both sides: - or /

sorry... :)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 6 guests