473,320 Members | 1,744 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,320 software developers and data experts.

getting current date in C in the VC environ

Hi,

I am basically a linux person being made to work on windows. and i have
been given a limited version of the windows i guess - for it doesn't
provide a proper help option :(. I sorely miss working on linux. but
now, I need to get the current date and if possible the current time as
well, from the system. I tried a lot of the inbuilt functions (like
localtime()) but it gave me errors that i couldn't rightly comprehend.
could anybody help me out with the function and its syntax, please?

Thanks a lot for your time and patience.

regards,
Scam.

Jan 13 '06 #1
7 2538
"Scamjunk" <br*********@gmail.com> wrote:
I am basically a linux person being made to work on windows. and i have
been given a limited version of the windows i guess - for it doesn't
provide a proper help option :(. I sorely miss working on linux. but
now, I need to get the current date and if possible the current time as
well, from the system. I tried a lot of the inbuilt functions (like
localtime()) but it gave me errors that i couldn't rightly comprehend.
Are you a programmer or a luser? _Quote_ error messages, damn it! How
the blazes are we to help you solve your problem when all you're saying
is "it doesn't work"? I expect that kind of error report from my
clueless users, not from a colleague.
could anybody help me out with the function and its syntax, please?


If localtime() doesn't do the same thing under Windows as it does under
Linux, then either your Windows implementation is not a real C compiler,
or your Linux one isn't real C, or both. Or perhaps you weren't using it
correctly on Linux in the first place? We can't tell unless you post
code.

Richard
Jan 13 '06 #2
Scamjunk said:
Hi,

I am basically a linux person being made to work on windows. and i have
been given a limited version of the windows i guess - for it doesn't
provide a proper help option :(.
Service Pack 7 fixes that (and all other Windows problems), and is
downloadable for free, from: http://www.isolinux.org
I sorely miss working on linux. but
now, I need to get the current date and if possible the current time as
well, from the system.


"The C Programming Language", Kernighan and Ritchie, 2nd edition, 1988,
Prentice Hall. I draw your attention particularly to pages 255-257.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jan 13 '06 #3
ern
microsoft.public.vc.language

Jan 13 '06 #4

ern wrote:
microsoft.public.vc.language


struct tm;
http://alien.dowling.edu/~rohit/wiki...andard_Library

Jan 14 '06 #5
ern said:
microsoft.public.vc.language


Why? It's a question about standard C.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jan 14 '06 #6
ern

Richard Heathfield wrote:
ern said:
microsoft.public.vc.language


Why? It's a question about standard C.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)


VC environment...

Jan 18 '06 #7
ern said:

Richard Heathfield wrote:
ern said:
> microsoft.public.vc.language


Why? It's a question about standard C.


VC environment...


....is irrelevant, since the question can be answered in standard C terms,
and was asked in a standard C newsgroup.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jan 19 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Draper | last post by:
I am having a lot of problems trying to get a Python CGI to run. I have included 3 parts... 1) A simple stripped down python module. 2) An output of what I get when I do: python index.py...
11
by: jim.eggleston | last post by:
Windows doesn't have a HOME environment variable, but it does have HOMEDRIVE and HOMEPATH. Could Windows versions of Python automatically populate os.environ with HOME, where HOME =...
9
by: deko | last post by:
What is it with these dates? What are they so much trouble? All I want to do is subtract an hour, but not if that makes dtmTest less than dtmClt. Dim dtmStart As Date Dim dtmEnd As Date Dim...
8
by: bryan | last post by:
Is there any way I can get the application path (the one returned by Request.ApplicationPath) in the Application_Start method in Global.asax? Request is not valid there. On a related note, is there...
4
by: John | last post by:
Hi I need to get the signature folder for the current folder such as; "F:\Documents and Settings\Dave\Application Data\Microsoft\Signatures\" except that instead of Dave I need the correct name...
9
by: boris.smirnov | last post by:
Hi there, I have a problem with setting environment variable in my script that uses qt library. For this library I have to define a path to tell the script whre to find it. I have a script...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
7
by: Joe P. Cool | last post by:
If I call os.environ.clear in a python program child processes still see the deleted entries. But when I iterate over the keys like so names = os.environ.keys for k in names: del os.environ ...
3
by: Tim Chase | last post by:
Not sure what's going on here and hoping for some insight: tim@rubbish:~$ echo $COLUMNS 129 tim@rubbish:~$ python2.5 Python 2.5.2 (r252:60911, May 28 2008, 08:35:32) on linux2 Type "help",...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.