Date Fromat | Output |
dd-MMM-yyyy | 15-Feb-2010 |
dd-MM-yyyy | 15-02-2010 |
dd-MMM-yyyy hh:mm:ss | 15-Feb-2010 11:25:56 |
dd-MMM-yyyy hh:mm tt | 15-Feb-2010 11:25 AM |
dd-MMM-yy | 15-Feb-10 |
MMM dd, yyyy | Feb 15, 2010 |
MMMM dd, yyyy | April 15, 2010 |
Example:
DateTime objDt = DateTime.Now;
objDt.ToString("dd-MMM-YYYY") = 15-Feb-2010