Formatting DateTime type , C#
i have a value of DateTime type.
i want to convert it to the below format.
TO_DATE('2010-11-18 16:45:55','YYYY-MM-DD HH24:MI:SS')
i am using,
DateTime dt1 = Convert.ToDateTime(fromDateTime).ToString("YYYY-MM-DD HH24:MI:SS");
its giving error tellin "Cannot implicitly convert type 'string' to 'System.DateTime'"
please help
Sheethal