Solved

Convert date to seconds.

Posted on 2000-02-29
1
260 Views
Last Modified: 2012-06-21
Hi

I accept a date formatted as dd/mm/yyyy as an argument to an executable. i want to get the corresponding seconds for that date. is there any function or should i convert manually calculating from jan 1, 1970(right?)

--begin
0
Comment
Question by:begin
1 Comment
 
LVL 22

Accepted Solution

by:
nietod earned 15 total points
ID: 2570430
use the mktime() function.  Use localtime() to convert back.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MSVCR80.dll crash 2 126
FMX enumerated colours 2 72
How to split this in C++ 4 78
Best book to learn C++ 4 55
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now