Support Forums

Add days to expiration

This is a discussion on Add days to expiration within the Technical Support forums, part of the Technical Support Forums category; Hi, I would like to add 180 days to all listings expiration date. I tried with UPDATE class_listings expiration = ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 01-29-2009, 05:41 PM   #1
Customer
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 285
Rep Power: 19
hel68c is just really nice hel68c is just really nice
Default Add days to expiration

Hi,

I would like to add 180 days to all listings expiration date.

I tried with UPDATE class_listings expiration = 'expiration' + '180';

but it's not working.

Do you have some knowledge with SQL?
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News,Youtube, Seller Store)
hel68c is offline  
Old 01-29-2009, 05:49 PM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,352
Rep Power: 134
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

I dont have the answer off the top of my head, but I can tell you that you just cant haphazardly add a number to the value of a field.

For starters, the expiration date is set as a specific date and time and its stored as a column type of datetime.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 01-29-2009, 05:52 PM   #3
curmudgeon
 
Join Date: Mar 2006
Posts: 5,352
Rep Power: 134
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

try.......

UPDATE class_listings SET expiration = DATE_ADD(expiration,INTERVAL 180 DAY)
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 01-29-2009, 06:01 PM   #4
Customer
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 285
Rep Power: 19
hel68c is just really nice hel68c is just really nice
Default

Right on. Lhotch your the best.

Thanks!
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News,Youtube, Seller Store)
hel68c is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
I Just opened this site a few days ago... zman78 Site Critiques 4 05-12-2006 11:19 AM


All times are GMT -4. The time now is 07:07 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0