Datetime.ParseExact

Hello
I am trying to convert the Date's coming from my database to standard. However I want to accomplish this within my script rather then doing the derived columns method.

This is what I am trying to do but it is not working

 if(!(found.AccountExpirationDate == null){

AccountExpirationDate=  Datetime.ParseExact (fAccountExpirationDate)

}

else{
AcountExpirationDate = Convert.ToDateTIme("1900-01-01 13:04:06);}

and I have defined DateTime?AccountExpirationDate

my error is AccountExpirationDate does not exist in this context?

Any ideas?

July 31st, 2015 12:01pm

Hi,

This is the forum to discuss questions and feedback for Microsoft Visio, not Visual Studio, I recommend you post the question to the MSDN forum for  Visual Studio

https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=netdevelopment

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
August 2nd, 2015 9:39pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics