Thread: Getting system Date

  1. #1
    Registered User
    Join Date
    Sep 2004

    Getting system Date

    I was looking in the FAQ's but the topic was pretty unclear. I want to know how to get the date from the system. Can anyone tell me the specific or recommended function to use? I want it in the mm/dd/yyyy format.

  2. #2
    Join Date
    Jun 2005

    this might be of some use, if you dont feel liek reading a
    windows specific function would be GetSystemTime()

    do a google search im sure you can prolly acheive something
    with that, or maybe time_t

  3. #3
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Here are some functions to deal with time, and formatting it in various ways (from the standard <ctime> header):

    You could also just bring it flowers and ask really nicely.

    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  4. #4
    Registered User
    Join Date
    Sep 2004
    That site is kinda iffy. So do i just say, GetSystemTime() and use the time.h library?

    Will this work?

    usign namespace std;
    int main()
    string Time;
    return 0;

  5. #5
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Something to start from. Jostle the format specifier a little. Perhaps "%m/%d/%Y".
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. casting the system exstracted date into seperate ints
    By bazzano in forum C Programming
    Replies: 1
    Last Post: 08-30-2005, 12:17 AM
  2. calculate age from date
    By bazzano in forum C Programming
    Replies: 1
    Last Post: 08-22-2005, 08:57 AM
  3. bad system date
    By Silvercord in forum A Brief History of
    Replies: 1
    Last Post: 04-30-2003, 08:29 AM
  4. reading the system date
    By Alicia in forum C++ Programming
    Replies: 5
    Last Post: 02-13-2002, 03:18 PM
  5. System Date
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 08-28-2001, 06:03 PM