Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
What field type to use |
Tue, Aug 19 2008 12:48 AM | Permanent Link |
"Adam H." | Hi,
I'm just wondering what field type anyone would recommend to store data that is a time lapse based which could hold hours or days. To explain a little better, we need to record how long something is stored for. It may be recorded in hours or days only. (And could be up to 30 days). No need for weeks, etc. Ideas I've come up with are: 1) Use a Double type field and specify the time in days (with hours being a fraction - similar to how a TDateTime field is stored) 2) Use a TDateTime field with the value being time between 0 (midnight 1899-12-31) or 3) Use two seperate integer fields (one for days, the other for hours) and write validation script to change entry if user enters something like 28hrs, etc. Data entry needs to allow the user to specify hours (up to and past 96hrs) or striaght days (such as 16 days). It may be much or a muchness, or is there a specific standard to store such data? Thanks & Regards Adam. |
Tue, Aug 19 2008 11:05 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< 3) Use two seperate integer fields (one for days, the other for hours) and write validation script to change entry if user enters something like 28hrs, etc. >> I would use 3) since it is closest to standard SQL date-time intervals, which is what EDB and other database engines use that implement the SQL interval types. This will give your more portability in the future also, since all database engines support integers and you don't have to try to split out float fields in SQL or filters. << It may be much or a muchness, or is there a specific standard to store such data? >> Yep, date-time intervals. You can read more about them here: http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=2&topic=35 -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Aug 19 2008 8:34 PM | Permanent Link |
"Adam H." | Good Morning Tim,
Thanks for your advise. Two seperate integer fields it is then! Have a great day! Adam. |
This web page was last updated on Tuesday, May 7, 2024 at 06:25 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |