Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
I know that the library function localtime will convert ...
I know that the library function localtime will convert a time_t into a broken-down struct tm, and that ctime will convert a time_t to a printable string. How can I perform the inverse operations of converting a struct tm or a string into a time_t?
✍: Guest
ANSI C specifies a library function, mktime, which converts a struct tm to a time_t.
Converting a string to a time_t is harder, because of the wide variety of date and time formats which might be encountered. Some systems provide a strptime function, which is basically the inverse of strftime. Other popular functions are partime (widely distributed with the RCS package) and getdate (and a few others, from the C news distribution).
2015-08-05, 1363👍, 0💬
Popular Posts:
What Information Is Needed to Connect SQL*Plus an Oracle Server? - Oracle DBA FAQ - Introduction to ...
What is the output of printf("%d")? 1. When we write printf("%d",x); this means compiler will print ...
When does the compiler not implicitly generate the address of the first element of an array? Wheneve...
If locking is not implemented what issues can occur? IFollowing are the problems that occur if you d...
What is the difference between "calloc(...)" and "malloc(...)"? 1. calloc(...) allocates a block of ...