>Actually, I'm not quite sure what I'm doing :~) I'm doing a timesheet app where the user must enter HH:MM in several places each day, the field should be blank until data is entered, then in HH:MM format. This is fixed in the design.
>
>I've explored using date, numeric and char fields, but nothing has worked the way I'd like so far...I like the datetime because it has a builtin check against bad values...but I'm open to any ideas, especially if anyone else has done something like this already..
I never needed datetime, so I never really "investigated" this type. I am very surprised how bad it's implemented. There is no FoxPro function to extract time from a datetime. (Or I didn't find it?)
In your case, I would use 2 fields. One for date, one for time. For time field: a char field with a special class: InputMask: 99:99. You can use InteractiveChange to test each key pressed (because it's fired for each key).
You can also have a hidden field of type datetime where you can keep the date and time in a standard format (this way you don't depend on SET DATE, SET SECONDS, a.m./p.m., etc). Replace this field each time by program, it's not a user entered field. It can be very good for indexes, even if it means a redundancy in your database.
Vlad
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only