Thread: C++ date time

  1. #1
    Registered User
    Join Date
    Feb 2006

    C++ date time

    Hi,i am a c++ beginer(*not*).i am using the visual studio 2003 comand prompt compiler.

    I wan't to write program that prints the current date and time.

    Can some one tell me the code/statement that would do print the date and time??

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Check this page out:

    That should give you the list of functions necessary to do all kinds of things with date and time. Just remember to include the <ctime> header before you use any of those functions or data types.

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    1. read FAQ
    2. search forum with "date time" key words
    3. read the answers to the similar questions
    4. write your own code
    5. if you'll have problems - post your code and ask concrete question
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Military Time Functions
    By BB18 in forum C Programming
    Replies: 6
    Last Post: 10-10-2004, 01:57 PM
  2. Getting time and date
    By winsonlee in forum C++ Programming
    Replies: 3
    Last Post: 08-18-2004, 11:31 PM
  3. The space time continueimnms mm... (rant)
    By Jeremy G in forum A Brief History of
    Replies: 32
    Last Post: 06-27-2004, 01:21 PM
  4. Help: Display time and date
    By stansu in forum C++ Programming
    Replies: 5
    Last Post: 08-22-2003, 02:27 PM
  5. I apologize. Good bye.
    By doubleanti in forum A Brief History of
    Replies: 14
    Last Post: 05-03-2002, 06:51 PM