Sysdate in c

edited June 2005 in Internet & Media
hi guys...im looking for a simple printf statement so that it displays the current system time and date...can anyone help?

Comments

  • edited June 2005
    ctime is most likely the easiest.

    What type of formating are you looking for?

    CSwett
  • edited June 2005
    [php]char tstr[128];
    time_t t = time(NULL);

    snprintf(tstr, 128, "The time and date are: %s.", ctime(&t));[/php]

    CSwett
  • edited June 2005
    Thats perfect m8...thanks...appreciated :D
Sign In or Register to comment.