Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find and replace won't work

Status
Not open for further replies.

DLDavis

Technical User
Oct 26, 2001
24
US
I'm using p9 interatively using a form to access my database within win98se. Today, I tried to go into my database to globally change all references to 10:15 .. to 10:15 AM... so I could sort appointments by day and then by time of day. Up til now...I've keyed appointment dates in as 10:15 1:15 3:15 etc....so the computer doesn't know how to sort them. I don't want to use military time.

At any rate...when I tried to use the find and replace to make the change....p9 wouldn't find. I'd already gone in and changed the field mask to allow PM and AM. What am I doing wrong?
 
DLDavis,

What's the data type of the underlying field? It should be either a time or a datetime. Paradox knows how to sort those values perfectly well.

If you're worried about the way the value is displayed, then change the format of the field object, not the datatype of the underlying field. To do that, right-click the field object in Design mode, choose Properties, select the Format tab, and then choose the one that you like best.

You can also create a custom format if one of these doesn't quite fit your needed.

When you do this, Paradox applies your format when it displays your data, but it still saves the data in whatever's appropriate for the underlying field type.

Now, if you're not getting the sort order you need, take a look at your indexes. Is your primary key different than the time field? If so, simply create a secondary index containing the time field and then use to display the data in your form.

Hope this helps...

-- Lance
 
Thanks! I'll give this a try and see what happens.

Are you saying that if you have a time field...that Paradox can sort them w/o my designating AM/PM during input?
 
DLDavis,

Yup. Date and Time values (as well as DateTime and TimeStamp) are all stored as floating point numbers, meaning the presence of "AM" or "PM" is strictly for your display and/or editing convenience.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top