UBB.Dev
Posted By: hatter Pulling dates from the database - 05/06/2002 2:06 PM
I'm working on some scripts and am having problems pulling B_Posted & B_Last_Post from the database. It acts as though there is nothing in the field. Here's what I'm trying to do:

code:
<% TestPosted = DateAdd("s", B_Posted, "01-Jan-70") %>



This is an asp script that is to convert unix time to normal time.

It just keeps spitting back the epoch. All of the other fields are pulled without any problem, it's just B_Posted & B_Last_Post. Does anyone have any insight or suggestions? Thanks
Posted By: Gardener Re: Pulling dates from the database - 05/06/2002 3:54 PM
What happens if you don't run DateAdd() on the value, does it come out right then?
Posted By: hatter Re: Pulling dates from the database - 05/06/2002 8:08 PM
The strangest thing happened. I worked on this all day yesterday, and even if I tried to display the raw data for B_Posted, nothing would display.

Today I go to play with it, hit refresh and it worked. DateAdd is definately the way to go for converting the unix timestamps. Thanks anyway, I feel silly now
© UBB.Developers