[Lazarus-es] trabajando con horas
José Antonio Cuello
josea en artextrading.com
Lun Oct 18 08:30:35 CEST 2010
Hola, no bastaría con hacer un cast a DateTime del campo Time y tratarlo
luego en lazarus con un formatdatetime?
Select Sum( CAST(TIME_FIELD as DateTime) ) from TABLE
Un saludo.
________________________________________________________________________
ARTEX TRADING S.A.
José Antonio Cuello Principal
El lun, 18-10-2010 a las 00:03 +0200, José Mejuto escribió:
> Select
> Cast(secs/3600 - 0.499999999999 as INTEGER) as Hours,
> Cast((secs - Cast(secs/ 3600 - 0.499999999999 as INTEGER)*3600)/ 60
> - 0.499999999999 as INTEGER) as Minutes,
> secs- (Cast(secs/3600 - 0.499999999999 as INTEGER)*3600+Cast((secs -
> Cast(secs/ 3600 - 0.499999999999 as INTEGER)*3600)/ 60 -
> 0.499999999999 as INTEGER)*60) as Seconds
> from (
> select SUM(TIME_FIELD - cast('0:0' as time)) as secs
> from TTABLE )
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus-es/attachments/20101018/b40aa6f7/attachment-0002.html>
More information about the Lazarus-es
mailing list