var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Can't get ASP to read date and time from SQL Server
what i'm trying to do is display
using this <% =Year(strDate) ' - ' =Year(strDate) + 1 %>
but i can't get ASP to read the date and time from SQL Server
ok... i give up...
What code are you using to get the date?
<% =Year(strDate) ' - ' =Year(strDate) + 1 %>
strDate is a string variable you created... I assume you put the date in it somewhere else?
If not, try the Date function...
ie: <% =Year(Date) & ' - ' & Year(Date) + 1 %>
Otherwise, I must be missing something.
the year function has a date as an input. I am guessing (from the one line of code you gave) that your trying to use it with a String returned from a recordset...
Either do what MrWizzard says which will get the server time, not the time from that string (which is probably what you want) or;
you will need to convert the string into a date using a string to date formatting function. For info on how to do it read here (in the Date/Time Functions (VBScript) section);