LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-28-2009, 07:08 PM   #1
abdul_zu
Member
 
Registered: Feb 2005
Posts: 71

Rep: Reputation: 15
MySQL question {urgent}


Hi friends,

I would like to update the Day in datetime filed of mysql how i can do this.

for the example
2009-07-29 20:12:45' is the value in DB now i need to change only 29 to 28 and the final will be 2009-07-28 20:12:45

Regards,
 
Old 07-29-2009, 02:02 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
What you want is the date_sub() fn http://dev.mysql.com/doc/refman/5.0/...ction_date-sub, see also date_add() as mentioned.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent help on MySQL... please aq_mishu Linux - Newbie 2 03-17-2008 05:14 PM
Urgent Question Regarding Urgent Questions! Need Help Now! Crashed_Again LQ Suggestions & Feedback 11 10-17-2007 08:07 PM
URGENT : mySQL -> 'ssl_cipher' thibz21 Linux - General 2 06-25-2006 09:39 PM
MySQL Help... Urgent thachp Linux - Software 15 05-14-2005 09:04 AM
mysql error, urgent please help chadi Linux - General 1 11-12-2004 06:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration