Click here to Skip to main content
15,899,474 members
Home / Discussions / Database
   

Database

 
QuestionQuery to Display records from 20 to 30 from total of 100 records Pin
indian14323-Feb-07 18:05
indian14323-Feb-07 18:05 
AnswerRe: Query to Display records from 20 to 30 from total of 100 records Pin
Hesham Amin24-Feb-07 7:29
Hesham Amin24-Feb-07 7:29 
AnswerRe: Query to Display records from 20 to 30 from total of 100 records Pin
Atif Ali Bhatti26-Feb-07 0:24
Atif Ali Bhatti26-Feb-07 0:24 
GeneralRe: Query to Display records from 20 to 30 from total of 100 records Pin
indian14326-Feb-07 0:35
indian14326-Feb-07 0:35 
QuestionMs access-how to get the difference between two time fields Pin
jeya krishnan.v23-Feb-07 17:37
jeya krishnan.v23-Feb-07 17:37 
AnswerRe: Ms access-how to get the difference between two time fields Pin
Hesham Amin24-Feb-07 7:31
Hesham Amin24-Feb-07 7:31 
QuestionEasy DateTime question Pin
gantww23-Feb-07 9:14
gantww23-Feb-07 9:14 
AnswerRe: Easy DateTime question Pin
kubben23-Feb-07 9:53
kubben23-Feb-07 9:53 
GeneralRe: Easy DateTime question Pin
gantww23-Feb-07 10:00
gantww23-Feb-07 10:00 
GeneralRe: Easy DateTime question Pin
kubben23-Feb-07 10:16
kubben23-Feb-07 10:16 
GeneraltimeStart,timeEnd Pin
bernie_01128-Feb-07 21:00
bernie_01128-Feb-07 21:00 
GeneralRe: timeStart,timeEnd Pin
kubben1-Mar-07 11:16
kubben1-Mar-07 11:16 
GeneralRe: timeStart,timeEnd Pin
bernie_0111-Mar-07 18:45
bernie_0111-Mar-07 18:45 
GeneralRe: timeStart,timeEnd Pin
kubben2-Mar-07 0:44
kubben2-Mar-07 0:44 
GeneralRe: timeStart,timeEnd Pin
bernie_0112-Mar-07 15:48
bernie_0112-Mar-07 15:48 
GeneralRe: timeStart,timeEnd Pin
kubben2-Mar-07 15:58
kubben2-Mar-07 15:58 
GeneralRe: timeStart,timeEnd Pin
bernie_0112-Mar-07 16:03
bernie_0112-Mar-07 16:03 
GeneralRe: timeStart,timeEnd Pin
kubben2-Mar-07 16:06
kubben2-Mar-07 16:06 
GeneralRe: timeStart,timeEnd Pin
bernie_0112-Mar-07 16:11
bernie_0112-Mar-07 16:11 
GeneralRe: timeStart,timeEnd Pin
kubben5-Mar-07 3:05
kubben5-Mar-07 3:05 
GeneralRe: timeStart,timeEnd Pin
bernie_0116-Mar-07 22:23
bernie_0116-Mar-07 22:23 
GeneralRe: timeStart,timeEnd Pin
kubben7-Mar-07 1:49
kubben7-Mar-07 1:49 
Here is the content of the link:
Subtracts the specified date and time from this instance.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax
Visual Basic (Declaration)
Public Function Subtract ( _
value As DateTime _
) As TimeSpan

Visual Basic (Usage)
Dim instance As DateTime
Dim value As DateTime
Dim returnValue As TimeSpan

returnValue = instance.Subtract(value)

C#
public TimeSpan Subtract (
DateTime value
)

C++
public:
TimeSpan Subtract (
DateTime value
)

J#
public TimeSpan Subtract (
DateTime value
)

JScript
public function Subtract (
value : DateTime
) : TimeSpan



Parameters
value
An instance of DateTime.



Return Value
A TimeSpan interval equal to the date and time represented by this instance minus the date and time represented by value.
Exceptions
Exception type Condition
ArgumentOutOfRangeException
The result is less than MinValue or greater than MaxValue.


Remarks
This method does not change the value of this DateTime object. Instead, a new TimeSpan is returned whose value is the result of this operation.

Before subtracting DateTime objects, insure that the objects represent times in the same time zone. Otherwise, the result will include the difference between time zones.

Example
The following code example demonstrates the Subtract method and operator.

Visual Basic Copy Code
Dim date1 As New System.DateTime(1996, 6, 3, 22, 15, 0)
Dim date2 As New System.DateTime(1996, 12, 6, 13, 2, 0)
Dim date3 As New System.DateTime(1996, 10, 12, 8, 42, 0)

Dim diff1 As System.TimeSpan
' diff1 gets 185 days, 14 hours, and 47 minutes.
diff1 = date2.Subtract(date1)

Dim date4 As System.DateTime
' date4 gets 4/9/1996 5:55:00 PM.
date4 = date3.Subtract(diff1)

Dim diff2 As System.TimeSpan
' diff2 gets 55 days 4 hours and 20 minutes.
diff2 = System.DateTime.op_Subtraction(date2, date3)

Dim date5 As System.DateTime
' date5 gets 4/9/1996 5:55:00 PM.
date5 = System.DateTime.op_Subtraction(date1, diff2)


Ben
GeneralRe: timeStart,timeEnd Pin
bernie_01112-Mar-07 1:28
bernie_01112-Mar-07 1:28 
GeneralRe: timeStart,timeEnd Pin
kubben12-Mar-07 2:06
kubben12-Mar-07 2:06 
GeneralRe: timeStart,timeEnd Pin
bernie_01112-Mar-07 17:22
bernie_01112-Mar-07 17:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.