How best to implement DATETIME?
Posted in 1992
Path: emory!wupost!sdd.hp.com!hp-col!col!judym From: judym@col.hp.com (Judy Miller) Newsgroups: comp.databases.informix Message-ID: <62980007@col.hp.com> Date: 12 Mar 92 23:31:03 GMT Organization: HP Colorado Springs Division How best to implement DATETIME? I'm new to Informix and do not have any experts of examples ... just the manuals. I need to represent a date and time in an Informix database for reporting purposes. Ideally, I want the datetime to be human readable when using isql Forms and Reports. The database is being updated by a Monitrol program (C-like) which supplies the number of seconds from 1970. (Is that a common UNIX practice, or just Monitrol? Does Informix recognize this format?) I don't have to use the Monitrol representation ... I have the ability to use the UNIX date command to return the date and time in a more meaningful format before updating the database. But I'm not clear on how to implement DATETIME in Informix: 1. How would I define MY_TIME in the Informix database? 2. What format should the data be in when updating the column MY_TIME? 3. Do I need to do anything special on the ISQL Form to view the datetime? 4. Do I need to do anything special in the ISQL Report to extract the datetime? 5. How do I specify in SQL "give me everything from today after 2:00 PM?" I'm going to spend some time with the manual and try some things, but any early direction would be greatly appreciated. Judy -------------------------------------------------------- Judy Miller, SIS UNIX MAIL: judym@col.hp.com Information Technology HPDESK: hp0800/UM Colorado Springs Division PHONE: (719) 590-3270 Hewlett-Packard FAX: (719) 590-7679 --------------------------------------------------------