Results 1 to 6 of 6

Thread: DateDiff

  1. #1
    Join Date
    Jan 2004
    Location
    France
    Posts
    43

    DateDiff

    DateDiff seems not working

    SELECT DATEDIFF(Minute,Members.Deb,
    Members.Fin) As Diff From Members

    I want to get the number of minutes for each members between to columns Members.Deb and Members.Fin.. and it doesn't work

    thank you

  2. #2
    Join Date
    Jan 2004
    Location
    France
    Posts
    43

    minutes

    I found the seconds in that way

    SELECT DATEDIFF("s",Members.Deb,
    Members.Fin) As Diff From Members

    but if I use "m" or "minute" I get an error, how can I get the minutes ?

    thank you

  3. #3
    Join Date
    Mar 2003
    Location
    Woking, UK
    Posts
    152
    I have no MS Access so I can't serve but maybe for minute is "mi" , try it.
    It works for MS SQL.
    You Have To Be Happy With What You Have To Be Happy With (KC)

  4. #4
    Join Date
    Jan 2004
    Location
    France
    Posts
    43
    I have tried it but it doesn't work ....

    maybe there is a way to use a convert .. to get with seconds a format like
    "Years : months : days : hours : minutes : seconds"
    ?

    thank you

  5. #5
    Join Date
    Mar 2003
    Location
    Woking, UK
    Posts
    152
    I have looked for datediff in VBA help and there is "n" fo minutes. Mayby it'll solve your task .
    yyyy Year
    q Quarter
    m Month
    y Day of year
    d Day
    w Weekday
    ww Week
    h Hour
    n Minute
    s Second
    You Have To Be Happy With What You Have To Be Happy With (KC)

  6. #6
    Join Date
    Jan 2004
    Location
    France
    Posts
    43
    perfect ! I was looking for it .....

    it works

    thanks a ton

Posting Permissions

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