Thread: Need help Creating C program day, month, year

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

    Need help Creating C program day, month, year

    All right so I need to make a C program on puTTy that will display the current day of the week, month, day of the month and year.
    I need to use sys/types.h and Time.h in addition to stdio.h
    If anybody could help me out or give me pointers, that would be greatly appreciated, Thank You!

    Ex Today is Wednesday - September 5, 2012

  2. #2
    Registered User
    Join Date
    Sep 2012
    Posts
    5
    If you look at all the functions, related to time/date/etc, that time.h provides this should be fairly straight forward. Grab a C book and there should be a chapter/section related to this that provides examples of certain functions and the commands that you can use(%d, %B, %G, etc). If you have a specific question related to anything I will help.

  3. #3
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    I found a related post,it is 10 years old but it seems good take a look if you want need current day, month, year

    Also you could see this example : Individual Day, Month, and Year - C++ Forum

    And for reference see here : struct tm - C++ Reference

    Tip : use google before asking something,because many others may have had the same question..In this way you could save time for yourself and not wait for somebody to answer
    Last edited by std10093; 09-05-2012 at 01:56 PM.

  4. #4
    Registered User
    Join Date
    Sep 2012
    Posts
    2
    I'll take a look. Thank You very much!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trying to find month/day from day of year
    By jmack549 in forum C Programming
    Replies: 3
    Last Post: 04-09-2009, 05:01 PM
  2. Help with Day Month Year Program..due by 12
    By jgassen15 in forum C Programming
    Replies: 1
    Last Post: 12-06-2007, 11:21 PM
  3. Year, month and day
    By Newbie999 in forum C Programming
    Replies: 15
    Last Post: 12-01-2006, 10:17 AM
  4. getting the next day's day, month, year etc
    By underthesun in forum C Programming
    Replies: 3
    Last Post: 02-17-2005, 07:43 AM
  5. need current day, month, year
    By ihatejava in forum C++ Programming
    Replies: 2
    Last Post: 10-19-2002, 11:41 AM