C# Date format

Hi, Following code is working in the VS2015 but not working in the 2012

DateTime startDate

Open in new window

This one is working in the 2012 startDate.ToUniversalTime() But after enter startDate.ToUniversalTime():s, getting error.
Any idea appricate.
Who is Participating?
zephyr_hex (Megan)Connect With a Mentor DeveloperCommented:
What is the error?  And what is the value of startDate ?  and what is ' :s ' ?

The problem is not going to be your version of Visual Studio, but the value of startDate, or what ' :s' is doing.

You'll see that this works fine:
		var startDate = DateTime.Now;
		var test = startDate.ToUniversalTime();

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.