|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
hi there i have to compare the datebase date(expirydate) with the server's date and if it is two weeks(server date) before the expirydate(database) the display changes
someone pls tell me what's wrong? i can't seem to get the right display.... the second if statement for the <td> doesnt seem to be working PHP Code:
Last edited by icepricessa : October 14th, 2003 at 01:56 AM. |
|
#2
|
|||
|
|||
|
i cant really see any thing wrong, only that maybe your not closing your <tr> tag with a </tr>??
but im sure it cant be this simple. ![]()
__________________
"Morgoth i Cried All Hope is Gone But i Swear REVENGE Hear my Oath!!" |
|
#3
|
||||
|
||||
|
hi there i have to compare the datebase date(expirydate) with the server's date and if it is two weeks(server date) before the expirydate(database) the display changes
someone pls tell me what's wrong? i can't seem to get the right display.... the second if statement doesnt seem to be working i've done a response.write and i got a difference of 14 days however, the particular 'box' which the expirydate is in does not change colour.. here's what i did PHP Code:
advise someone??? |
|
#4
|
||||
|
||||
|
why can;t this bit of codework?
Code:
DateDiff("m", FormatMediumDate(created), FormatMediumDate(objRS("ExpiryDate"))) = 1
|
|
#5
|
|||
|
|||
|
i can't see any errors also.
- are both your dates the same format (i.e, mm/dd/yyyy or dd/mm/yyyy) when comparing using the DateDiff? - are both your dates the same field type (i.e datetime field)? sometimes we accidentally compare a string with a datetime field, so it can't compare. anyway, you can try this link though. http://www.w3schools.com/vbscript/func_datediff.asp
__________________
Hope this helps. Mike Royal Selangor Pewter "I have not failed. I've just found 10,000 ways that won't work." - Thomas Alva Edison (1847-1931) |
|
#6
|
||||
|
||||
|
thanks pda8333
![]() |
|
#7
|
|||
|
|||
|
can it work already? what was wrong then?
|
|
#8
|
||||
|
||||
|
lol.. it seems that my placing of the expirydate and the today's date made a difference lol
![]() i changed datedif("d", RS5("expirydate"), date) to datediff("d",date,RS5("expirydate")) o.O |
|
#9
|
|||
|
|||
|
good for u.
|
|
#10
|
||||
|
||||
|
keke thanks... *sigh of relief* finally one problem down :P
|
|
#11
|
|||
|
|||
|
u mean u have more than 1 problem?
![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > can't display table colours |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|