MyBB Community Forums
[How To?] [SQL Query] To Change Dates in a Range - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [How To?] [SQL Query] To Change Dates in a Range (/thread-215120.html)



[SQL Query] To Change Dates in a Range - pg001 - 2017-12-31

Can someone give me the SQL Query to Change the Joined Year of all members from a range like 200x-201x and replace it with a single year like 2017? 
I am trying to learn Phpmyadmin and SQL queries on local server and can't find a solution to this particular case.

Any help is appreciated.


RE: [SQL Query] To Change Dates in a Range - Wires - 2017-12-31

Should be as follows:

UPDATE mybb_users SET regdate = value WHERE regdate between value2 and value3;

Remember that the database stores timestamps in UNIX so the values will also have to be in UNIX. This site might help: https://www.unixtimestamp.com/