Update query to current date

Hi,

I want to update my date to the current date.

this is the format I have in the database.
2011-08-05
2011-09-10

            Update ADS
            set (AdsStatus = 1),
            (AdsDate = getdate())
            where AdsID = #URL.AdID#
lulu50Asked:
Who is Participating?
 
EyalCommented:
try

 Update ADS
            set AdsStatus = 1,
            AdsDate = getdate()
            where AdsID = #URL.AdID#
0
 
EyalCommented:
what is AdsDate field type ?
0
 
lulu50Author Commented:
AdsDate field type is Date
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
EyalCommented:
the query is ok. do you get some kind of error?
0
 
lulu50Author Commented:
Syntax error or access violation: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(AdsStatus = 1), (AdsDate = getdate()) where AdsID = 4' at line 2
0
 
lulu50Author Commented:
General error: FUNCTION lulu50_ChurchesBulletin.getdate does not exist
0
 
lulu50Author Commented:
Update ADS
            set AdsStatus = 1,
            AdsDate = CURRENT_DATE()
            where AdsID = #URL.AdID#
0
 
lulu50Author Commented:
there is no getdate  functio in mysql

Current_date() worked.

thanks,
0
 
lulu50Author Commented:
Thanks,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.