this is quite a basic question so I would sugest you try looking at some of the tutoials on c# or get a book as while people can reply to this it is better for you if you have some basic grounding or even try using google first.
Learn to use custom date and time format strings to convert DateTime or DateTimeOffset values into text representations, or to parse strings for dates & times.
Comment