I am trying to port the following SQL statement from informix to SQL Server 2000. I do not have access to an informix database, so I cannot try out the following SQL statement to see what it does.
select kingdom_id ,current year to second,wb_id
where rank_id = 10
I am trying to find a replacement for the informix specific command "current year to second" in SQL Server. I am thinking of using the GetDate() function from SQL Server. GetDate would return a response something like this:
Could someone tell me what current year to second returns so that I can see if the GetDate() function meets my needs?
CURRENT returns the instant expressed in datetime format. The default format for CURRENT is 'datetime, year to fraction', which has the format: "2006-10-24 23:52:16.123". In your query the precision is determined to 'year to second', which will show the instant as "2006-10-24 23:52:16". So if you want to meet the output you described for GetDate you only have to use