Jump to content
  • 0

Searching on a timestamp


mburns

Question

I set up a table that, when someone uses a submission datapage, gets a day/time field populated by a timestamp.

Any reason why a search datapage wouldn't be able to find records if someone used a calendar pop-up on a textfield entry for that timestamp field?

mburns

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

There are a few reasons that this could happen. The most likely reason would be that your logical operator is set to equals. So if you use the calendar pop you are only going to be given a date such as mm/dd/yyyy.

The code is then looking through your table for a date that matches exactly. Since this is a timestamp you also have the time included (therefore no match will be found)

You need to setup criteria on your date search and have two fields. One from the beginning (start date) and one for the end (end date) in order to return results.

I have created an example that I think is what you are describing.

Please see http://bridge.caspio.net/dp.asp?AppKey= ... G5F2F8E5I2

Link to comment
Share on other sites

  • 0

OK -- I tested your example. There's a problem with it -- if I have entries in the DB for 6/4/2007, I can't set the start/end dates BOTH for 6/4/2007. I get no records.

I know why this is happening, but a user isn't going to understand why they can't find something they might know was added on a certain date.

Anyone else wanna chime in here?

Link to comment
Share on other sites

  • 0

I have since modified the example. Please check it out. Caspio has released a new version of its application last week and for date/time fields they now have a new function called \"precision\"....this fixes the date/time field issues you were having in the first place in regards to timestamps.

What I did to my example was to just add another criteria called exact date and set the precision to \"date\"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...