var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How can i get the year of the moment?
I want to get the result like 2009 of the current date. Is there a function to do so?
Something like that.
Also if there is none. I can convert getDate to varchar and substring the date value so i can get the result 2009...
Also this will be an int value in DB so i want to convert "2009" to 2009.
How can i do it?
Please urgent help is needed. If i was not in such a rush i would just read it but i have no time at the moment...
Manual for datepart
select datepart( year, getdate() )
Thank you so much for that document. It will help me a lot.
Yes. If you are learning, then you need to understand the CONVERT() Function, where it relates to date parts as well; refer "style".
SELECT CONVERT( CHAR(4), GETDATE(), 123 )
Last edited by Derek Asirvadem; 09-11-09 at 01:01.
Derek Asirvadem (Formerly DerekA)
Information Architect / Senior Sybase DBA
Copyright © 2009 Software Gems Pty Ltd
I answer questions from the Original Poster only. If you have a genuine question, as the moderators have requested, start a new thread.