Hi Matthew, something like this may help you: ....where cast((current_timestamp - start_time)hours as integer) <= 4
Cheers, Paul. -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] Behalf Of Warren, Matthew (Retail) Sent: 08 January 2004 11:24 To: [EMAIL PROTECTED] Subject: timestamps in select Hallo, I am using the following select statement; select entity,((sum(bytes)/1024)/1024) as MB from summary where entity in (select node_name from nodes where domain_name like 'DM%') and start_time>timestamp(current_date - 1 days) and activity='BACKUP' group by entity I would like to be able to specify a period of hours preceding the current date/time, rather than a whole number of days [ timestamp(current_date - 1 days) ]. My SQL's not so hot, if anyone could show me how to do it I would be very grateful. Thanks, Matt. ___________________________ Disclaimer Notice __________________________ This message and any attachments are confidential and should only be read by those to whom they are addressed. If you are not the intended recipient, please contact us, delete the message from your computer and destroy any copies. Any distribution or copying without our prior permission is prohibited. Internet communications are not always secure and therefore the Powergen Group does not accept legal responsibility for this message. The recipient is responsible for verifying its authenticity before acting on the contents. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Powergen Group. Registered addresses: Powergen UK plc, 53 New Broad Street, London, EC2M 1SL Registered in England & Wales No. 2366970 Powergen Retail Limited, Westwood Way, Westwood Business Park, Coventry CV4 8LG. Registered in England and Wales No: 3407430 Telephone +44 (0) 2476 42 4000 Fax +44 (0) 2476 42 5432 Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement. This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited. If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system.