Conversion of string to Datetime
Posted Date Unknown 1 Comment

Hi

I have a sting variable 

string strdate="00:12:20"

It is converted to datetime as

DateTime dttime=Convert.ToDateTime(strdate);

but it is found that hour automatically updated to current system hour like ("12:12:20")

How can I overcome this problem?



See All Responses Below...
Author
Message Rating
Posted on: 18/10/2013
There should be some provision to set the date time format in the class. Set the format in the Date Time object then try.

Tom
Please Login to Post Your Comments
Name (Max. 100 characters)
Please post your comments here
Select Language
Comments
Attach File(Max. Size: 2 MB)
A few simple rules when posting your Comments,
  1. Please post only answers relevant to the topic of discussion.
  2. Please dont misuse this site or do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will delete your inappropriate messages and will block or delete your account on this site. 

TekTipsDownload
GateExam
Academic Projects
TekTipsExperts



 
Site optimized for IE7, 1280 X 768 and above. Copyright © 2010 - 2018 KTS InfoTech
Site Developed Using KTS WebCloud