DateDiff in Month & Days format

This is a discussion on DateDiff in Month & Days format within the C Programming forums, part of the General Programming Boards category; Hi, How i can get date difference in Months and Days? Is there functions i can use to get this? ...

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    2

    DateDiff in Month & Days format

    Hi,

    How i can get date difference in Months and Days?

    Is there functions i can use to get this?

    I'm totally new to C.

    Thanks for anykind of help,

    Rwe

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,336
    There's difftime() in time.h

    How are you representing your time values to begin with?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    2
    I'm passing all six component idenpendantlay. Like M1, D1, Y1 and M2, D2, Y2

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,336
    So you could call mktime() for those two times, then do a difftime() between them?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't Format C
    By caroundw5h in forum Tech Board
    Replies: 40
    Last Post: 04-26-2004, 09:57 AM
  2. Calculating days between two Dates
    By Niy in forum C++ Programming
    Replies: 9
    Last Post: 03-12-2002, 07:16 PM
  3. extending a month calander to a year
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 02-03-2002, 05:39 AM
  4. while, sentinel, if, switch
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 11-11-2001, 10:50 PM
  5. Pointers, arrays , functions
    By sballew in forum C Programming
    Replies: 19
    Last Post: 09-16-2001, 11:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21