Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2011
    Posts
    8

    Unanswered: diff between two dates

    hi i want diff between two dates in (days,hours,and mins format)
    but the date field in my data base is 2011-9-11 23:15:00


    Can some please help me to find out the problem....

  2. #2
    Join Date
    Oct 2010
    Posts
    46
    Quote Originally Posted by pavansap View Post
    hi i want diff between two dates in (days,hours,and mins format)
    but the date field in my data base is 2011-9-11 23:15:00


    Can some please help me to find out the problem....
    You didn't say what the problem is.

    There is nothing wrong with the format 2011-9-11 23:15:00.

    To find out the difference between 2 dates, use the DateDiff function.

    DateDiff

    DateDiff returns a number of time intervals between two specified dates

    Syntax:

    DateDiff (intervalType, startDateTime, endDateTime)
    DateDiff (intervalType, startDateTime, endDateTime, firstDayOfWeek)

    intervalType is a String expression that is the interval of time you use to calculate the difference between startDateTime and endDateTime.
    startDateTime is the first DateTime value used in calculating the difference.
    endDateTime is the second DateTime value used in calculating the difference.
    firstDayOfWeek is an optional constant specifying the first day of the week.

    Returns
    A Number value

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •