String format = "dd-MM"; String dateStr = date.ToString(format);
SELECT CAST(DAY(GETDATE()) AS VARCHAR(2)) + ' ' + DATENAME(MM, GETDATE()) AS [DD MM]
select convert(varchar(5), getdate(), 105)
DateTime dt = Convert.ToDateTime("12-4-1989 12:00:00 AM"); //Coming from your DB, I have hardcoded here string dt1 = String.Format("{0:dd-MM}", dt);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)