Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
C#
and calculate the remaining time for next birthdate in month,days,hours,minutes and seconds.


What I have tried:

Calculate difference between two birthdates in console application.
Posted
Updated 27-Apr-16 18:52pm
v2
Comments
Garth J Lancaster 28-Apr-16 0:47am    
Please amend your question with the code you have tried - otherwise its just us giving you the answer, instead of trying to help you with your code - your tutor might be lenient on you getting help from us, but certainly wont if we gave you an answer you dont understand
@j@y123 28-Apr-16 0:50am    
I am not started with code.

1 solution

 
Share this answer
 
Comments
@j@y123 28-Apr-16 1:01am    
I want to add that birthdate by user.
@j@y123 28-Apr-16 1:02am    
in [dd-mm-yyyy] format
Karthik_Mahalingam 28-Apr-16 1:07am    
DateTime dt = DateTime.ParseExact("28-04-2016", "dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture);

check this for date parsing
DateTime.ParseExact Method (String, String, IFormatProvider) (System)[^]

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