  | | | Timestamp and epoch | Timestamp and epoch 2007-01-15 - By Zabach, Elke
Back Michael J?rgens > > Hi, > > is there any sql function to convert a timestamp into an > epoch (seconds > since 1970 ...) and vice versa? > > regards, > > Michael >
There is no such function pre-defined. If you really need it (and not only are used to use it), then a user-defined-function calling
select 86400 * (datediff ( <your timestamp>, '19700101000000') + 3600 * hour ( <your timestamp> ) + 60 * minute ( <your timestamp> ) + second ( <your timestamp> ) into :outputparam from dual
may help
Elke SAP Labs Berlin
> > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: > http://lists.mysql.com/maxdb?unsub=elke.zabach@(protected) > > >
-- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/maxdb?unsub=mysql@(protected)
|
|
 |