C Program to Display the current Date and Time - JohnHau/mis GitHub Wiki

The C library function char *ctime(const time_t *timer) returns a string representing the localtime based on the argument timer. The returned string has the following format: Www Mmm dd hh:mm:ss yyyy. Here Www is the weekday, Mmm the month in letters, dd the day of the month, hh:mm:ss the time and yyyy the year.

Below is the program to display current date and time.

#include<time.h> is used for time and ctime function and time_t datatype. image image

⚠️ **GitHub.com Fallback** ⚠️