Thread: days

  1. #1
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    Posts
    501

    days

    I was wondering, how to get the number of days between to dates. I was thinking that if you subtracted two (time_t)s then convert that to struct tm, then use the tm_mday, but if the difference was greater that 31, that wouldn't work, any ideas?

  2. #2
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    Posts
    501
    wait, I think I got, will just divide by number of seconds in day, I was thinking about it too much.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advancing Days
    By nhubred in forum C++ Programming
    Replies: 0
    Last Post: 06-01-2009, 06:22 PM
  2. Plz help me C programm
    By ferroz1 in forum C Programming
    Replies: 7
    Last Post: 05-10-2008, 06:55 AM
  3. summing number of days between 2 months
    By duff_johnny in forum C Programming
    Replies: 5
    Last Post: 11-03-2005, 02:36 PM
  4. Counting Number of days from year zero
    By wireless in forum C++ Programming
    Replies: 4
    Last Post: 06-16-2002, 07:31 AM
  5. while, sentinel, if, switch
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 11-11-2001, 11:50 PM