November 29th, 2012, 12:48 PM
Format Date Returned from MS SQL
I am trying to format a date value on my ASP pages, returned from MS SQL. One of my SQL field(status_dt), has a datatype of “datetime.” I created an ASP page to pull in this date, and it is displayed in the format of mm/dd/yyyy. However, how can I have it displayed as, November, 2012?
I found an ASP function(DateTime.Now.ToString("Y")) that does this, but as you can see, it is using the current’s system date. I tried plugging my Status_Dt field into the code, but apparently it is not working. Please help!
I tried this with my field, but no luck.
November 29th, 2012, 03:06 PM
response.write monthname(month(d)) & ", " & year(d) & "<br>"
Brinkster- free development account. Not affiliated, but I sure like free. Brinkster.com
November 29th, 2012, 04:42 PM
Great! this works! thank you so much!