GoHacking.com: Ethical Hacking and Cyber Security
Home » C SOURCE CODES

C Program to Get the Current System Date

Submitted by on Wednesday, 16 January 2008One Comment

This program will get or read the current system date from the system. It displays Year, Month and Day.

 
 
 
 
#include <dos.h>
#include <stdio.h>

int main(void)
{
struct date d;
getdate(&d);
printf(“The current year is: %d\n”, d.da_year);
printf(“The current day is: %d\n”, d.da_day);
printf(“The current month is: %d\n”, d.da_mon);
return 0;
}

Popularity: 1% [?]

Visitors who read this post, also read:

  1. Zemana Antilogger: Download Link with One Year Free License


Subscribe to GoHacking.Com


Enjoyed this article?
Subscribe to GoHacking.Com and get daily updates in your email for free


  By using/following this site you agree to our Legal Disclaimer

One Comment »

  • Gaurav said:

    Thanks a Lot.
    It helped me a Lot.
    THANK YOU..!!! :-)

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.