Home » Ask & Discuss » Other Courses » Computer Applications « Back to Discussion



Computer Applications

abhay's Avatar
New kid on the Block

Joined: 3 Oct 2008
Post: 2
3 Oct 2008 23:52:44 IST
0 People liked this
2
637 View Post
wap to find the current system date and time.
None

wap to find the current system date and time.


Share this article on:

Comments (2)

Sudeshna  Shyam's Avatar

New kid on the Block

Joined: 14 Oct 2008
Posts: 9
14 Oct 2008 20:44:27 IST
0 people liked this



<?php
print strftime('%c'); 

?> 

Sagar Saxena's Avatar

Forum Expert
Joined: 8 Oct 2008
Posts: 7221
17 Oct 2008 23:38:51 IST
0 people liked this

hello dear,


Plz check it and tell me whether it is runing or not


This program can be used to set the system date or to change the current system date.



#include <stdio.h>

#include <process.h>

#include <dos.h>



int main(void)

{

struct date reset;

struct date save_date;

getdate(&save_date);

printf("Original date:\n");

system("date");

reset.da_year = 2001;

reset.da_day = 1;

reset.da_mon = 1;

setdate(&reset);

printf("Date after setting:\n");

system("date");

setdate(&save_date);

printf("Back to original date:\n");

system("date");

return 0;

}




Quick Reply


Reply

Some HTML allowed.
Keep your comments above the belt or risk having them deleted.
Signup for a avatar to have your pictures show up by your comment
If Members see a thread that violates the Posting Rules, bring it to the attention of the Moderator Team
Free Sign Up!

Preparing for IIT-JEE ?

Arihant Revision Package for IIT JEE - Books, Practice Tests + Rank Predictor


@ INR 1,995/-

For Quick Info

Name

Mobile No.

Find Posts by Topics

Physics.

Topics

Mathematics.

Chemistry.

Biology

Parents

Board

Fun Zone

Sponsored Ads