Sep 26, 2002 #1 Silvinho Programmer Jul 9, 2001 58 GB Is it possible to display only the year of a date in asp ie: the database stores the record '21/08/2002', i just want the asp page to show '2002'
Is it possible to display only the year of a date in asp ie: the database stores the record '21/08/2002', i just want the asp page to show '2002'
Sep 26, 2002 #2 mit99mh Programmer Sep 24, 2002 246 GB try this: <% Dim iYear iYear = DatePart("yyyy", objRS("myDate") Response.write iYear %> Hope it helps Upvote 0 Downvote
try this: <% Dim iYear iYear = DatePart("yyyy", objRS("myDate") Response.write iYear %> Hope it helps
Sep 26, 2002 #3 robctech IS-IT--Management Oct 12, 2001 114 CA Try this, Code: <%=year(recordset("datefield"))%> if you need something else or are getting errors give more detail and copy of the error. Hope this helps Upvote 0 Downvote
Try this, Code: <%=year(recordset("datefield"))%> if you need something else or are getting errors give more detail and copy of the error. Hope this helps
Sep 26, 2002 #4 onpnt Programmer Dec 11, 2001 7,778 US faq329-2091 A language that doesn't affect the way you think about programming is not worth knowing. http://www.onpntwebdesigns.comadmin@onpntwebdesigns.com Upvote 0 Downvote
faq329-2091 A language that doesn't affect the way you think about programming is not worth knowing. http://www.onpntwebdesigns.comadmin@onpntwebdesigns.com