How do I compare current date with dates stored in MySQL db?
Posted
by
Gabriele
on Stack Overflow
See other posts from Stack Overflow
or by Gabriele
Published on 2011-03-15T16:05:53Z
Indexed on
2011/03/15
16:09 UTC
Read the original article
Hit count: 218
Hello, I'm coding a uploader that saves into the db the date when a file is uploaded using CURDATE(). I want to compare the current date with the one stored into the db in order to change the color of the icon related to the file depending on how long has this feel been uploaded. For instance, if less than a week, the icon will be green, if more than a week, it will be yellow, if more than two weeks, red. How can I do it? Thanks.
© Stack Overflow or respective owner