Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 7th, 2012, 12:39 PM
Authorized User
Join Date: Jun 2010
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to substract with Sysdate?

I have a table in SQL Server in which there is a column LastLoginDate
Datatype Datetime . I would like to substract LastLoginDate with sysdate.

Lst Loin Date SysDate
(7/20/2012 7:01:48 AM)-(8/07/2012 7:01:48 AM)

I would like to claculate only number of days.
Please help me.

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to subtract hours from sysdate in oracle mcmouli Oracle 4 January 7th, 2011 06:52 AM
substract the date . . . . . . . . . pandjie JSP Basics 1 January 29th, 2005 10:25 PM
sysdate mateenmohd SQL Server 2000 3 September 28th, 2003 07:42 AM
Urgent help! Compare a string to Sysdate in Oracle WroteForLuck Classic ASP Basics 1 July 22nd, 2003 01:48 AM
Urgent help needed! Compare a string to Sysdate in WroteForLuck Classic ASP Professional 1 July 17th, 2003 06:11 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.