Click here to Skip to main content
15,888,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a datetime picker have a custom format like this

ddddd,MMMM dd, yyyy hh:mm: tt

Now I dont know how to convert a select day to total seconds

Ex : Today is 9/13/2013 10:51 AM then I will choose 9/14/2013 11:00 AM

How do I calculate the total seconds from now to the day I choose ?

Thanks for your help
Posted

1 solution

Hello,
Please try this.

If you have date1 and date2. In date1=Today date and date2=selected date.
and you want to find second then

double totalSeconds = (date2-date1).TotalSeconds;


May be this help you.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900