Forums
This topic is locked
Display for a week...
Posted 19 Jul 2004 21:23:26
1
has voted
19 Jul 2004 21:23:26 Matt Waller posted:
I'm working on a site that I update pretty often, so I'm wanting to write some code(SQL and ASP Javascript) that will display a "NEW!" title beside records that have been added within the last week. Is there an SQL or Javascript command that can do that easily?I would apppreciate any help I can get? <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>
Replies
Replied 20 Jul 2004 21:32:41
20 Jul 2004 21:32:41 Matt Waller replied:
Well, nevermind I guess...
I figured out a reasonably simple way to do it. Just compare the current date minus 604800000(a week's worth of milliseconds) to the date the record was added. If the added date is above or equal with that, it will display my item.
If anyone has a more efficient way of doing this, I would love to hear it! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
I figured out a reasonably simple way to do it. Just compare the current date minus 604800000(a week's worth of milliseconds) to the date the record was added. If the added date is above or equal with that, it will display my item.
If anyone has a more efficient way of doing this, I would love to hear it! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 20 Jul 2004 21:44:03
20 Jul 2004 21:44:03 Dave Thomas replied:
i know the code for asp/vbscript if you can convert it over
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]