fpineda101
Well-known member
I'm trying to get the time remaining from a 7 day auction. There is a timestamp (datecreated) which has 7 days added to it. I want to find out how much time remains in days, hours, minutes and seconds when a page is refreshed...
This is what I have so far. It tells me there is a error "Incorrect syntax near keyword 'truncate'"
SQL = "Select truncate((datecreated + 7) - GetDate()) + ' days ' " _
& "+ truncate( ((datecreated + 7) - GetDate() )%24, 24) ) + ' hours ' " _
& "+ truncate( ((datecreated + 7) - GetDate() )%24 * 60, 60) ) + ' minutes ' " _
& "+ truncate( ((datecreated + 7) - GetDate() )%24 * 60 * 60, 60) ) + ' seconds remain' " _
& "FROM table_name"
Any help would be appreciated!
This is what I have so far. It tells me there is a error "Incorrect syntax near keyword 'truncate'"
SQL = "Select truncate((datecreated + 7) - GetDate()) + ' days ' " _
& "+ truncate( ((datecreated + 7) - GetDate() )%24, 24) ) + ' hours ' " _
& "+ truncate( ((datecreated + 7) - GetDate() )%24 * 60, 60) ) + ' minutes ' " _
& "+ truncate( ((datecreated + 7) - GetDate() )%24 * 60 * 60, 60) ) + ' seconds remain' " _
& "FROM table_name"
Any help would be appreciated!