Suvarna Garge (Editor)

C date and time functions

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

The C date and time functions are a group of functions in the standard library of the C programming language implementing date and time manipulation operations. They provide support for time acquisition, conversion between date formats, and formatted output to strings.

Contents

Overview of functions

The C date and time operations are defined in the time.h header file (ctime header in C++).

Example

The following C source code prints the current time to the standard output stream.

The output is:

References

C date and time functions Wikipedia