how to convert DATETIME hh:mm to integer
Posted in 1999
Topics: General Discussion
Hi, are there any good ways of conversion of DATETIME (or better INTERVAL) hours:minutes to integer? i
io wrote: > > Hi, > are there any good ways of conversion of DATETIME (or better INTERVAL) > hours:minutes to integer? Check the library of date/datetime functions I posted to the IIUG Software Repository called datefuncs.shar. If what you want is not there there certainly is enough code to show you how to do what you want to do. Art S. Kagel
In article <7869kf$c6k$1@news.xmission.com>, io <oia@entel.kiev.ua> wrote: > are there any good ways of conversion of DATETIME (or better INTERVAL) > hours:minutes to integer? If your datetime column is "mydate" Then: select month(mydate), day(mydate), year(mydate) from mytable does what you want??? Tony -- asalerno@monmouth.com -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
io wrote:
> are there any good ways of conversion of DATETIME (or better INTERVAL)
> hours:minutes to integer?
Integer minutes?
CREATE PROCEDURE time_in_minutes(i interval hour(7) to minute)
returning integer; define x interval minute(9) to minute;
define s char(10);
let x = i - 0 units minute;
let s = x;
return s;
end procedure;
Just a minor variant on an FAQ.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>