Saturday, July 9, 2011

How to set a string value to Time Stamp format in C#.

Example

Original value string ="096850"

O/P time stamp format= 09:68:50


string strTime = DateTime.ParseExact("096850", "HHmmss", null).ToString("HH:mm:ss");

No comments:

Post a Comment