To String No Seconds - CSharp System

CSharp examples for System:DateTime Second

Description

To String No Seconds

Demo Code

// Copyright (c)2008-2011 Mark II Software, LLC.  All Rights Reserved.
using System.Text;
using System.Collections.Generic;
using System;/*from  ww  w.  ja  v  a  2s  .  co  m*/

public class Main{
        public static string ToStringNoSeconds(this DateTime dt)
		{
			return dt.ToString("M/dd/yyyy hh:mm tt");
		}
}

Related Tutorials