Click here to Skip to main content
15,886,840 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
i have to convert session["datetime"] to minute .
can we do in asp.net c#.if yes then how?
Posted
Comments
Zafar Sultan 7-Jan-13 7:55am    
You want to convert a date to minutes??? It is possible to calculate the time between two dates in minutes. But what do you want to achieve? Are you trying to get only minutes of the specified date?

1 solution

Use Convert.ToDateTime(string) to convert the string to datetime and from that datetime extract the minutes...
if the datetime contains hours and u want them in minutes, simply convert them to minutes and add to the minutes retrieved from the datetime...
 
Share this answer
 

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