473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to get system Date and Time and display it ??

How to get system Date and Time and display it in the format DD/MM/YYYY ??
Mar 16 '12 #1
2 3439
CHTH
1
#include <stdio.h>
#include <time.h>
int main(int argc, char *argv[])
{
time_t t;
time(&t);
printf("%.24s.\n", ctime(&t));
return 0;
}

Output
"Fri Mar 16 11:52:17 2012."
Mar 16 '12 #2
Thanx a lot.............
Mar 20 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: OtherOne | last post by:
My system clock tends to lose (or sometimes gain) time and I am running some time critical processes so I need to keep the clock synchronized. I wrote the code to get the time from a time server...
1
by: steven virnig | last post by:
We have an application group that wants to pull date from SQL Server and write it to text file on the server. They want the file format to be 12100_YYYMMDDHHMM.fr1 for one set of data,...
1
by: MLH | last post by:
I want to change my system time date each time an A97 app is started. Here's how I've been doing it. Am looking for a better way. Sure some of you have researched this. Function...
3
by: Marauderz | last post by:
Hello guys, got a little question regarding the regional language settings . Anyway I got a Windows 2003 Server machine that was installed with the date format "dd/MM/yyyy" and location still...
3
by: John | last post by:
Hi How can I get the system date and system time (separately)? I have tried now() but it returns both date/time. Thanks Regards
3
by: tahuya_rat | last post by:
Seems like it should be pretty simple to me, but I'm coming up short on answers. I'm not trying to find out how to sync to an atomic clock or anything like that, I just want to know the procedure...
2
by: Colli | last post by:
Hi: I need to setup a continuously updating system Date/Time in my user interface. I can get the system date/time and can cause it to update with a button-click but I can't seem to figure out how...
1
by: pdesh3 | last post by:
Hi, I have a form in which 3 fileds are displayed on the top banner. They are DATE, NAME, LOCATION. 1. I want to make DATE filed dynamic where it whould read system date and display on...
2
by: kkshansid | last post by:
i want to know how to change date formate in visual basic project from control panel???? from mm/dd/yyyy to dd/mm/yyyy in vb calender control
0
by: kkshansid | last post by:
i know about formate function but i want to confirm that if it has anything to do with system date time in controll panel such that dd/mm/yyyy when i formate system it changes to mm/dd/yyyy...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.