Could someone please show me a way in SQL and C# to format my date string like the following?
2/24/2012 22:00
Note: I don’t need the seconds.
given:
declare @myDate varchar(50)
set @myDate = '2/24/2012 10:00 PM'
select @myDate
I’m showing the code snippet above to indicate that the date’s source type is varchar.
For SQL, you can try:
For C#,