Welcome To Snipplr
Everyone's Recent MySQL Snippets Tagged date
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
Created as reply to question on ittoolbox.com:"Need your help in writing a query to pull audit history i.e. Last updated by a user 'XYZ' and for the same record key (ID) the second last record in the audit history table. i.e. Last update by this user...
0
808
posted 8 years ago by bvwatson
Converts textual dates like '1-3-1954' and '01-02-1963' to respectively '1954-3-1' and '1963-02-01'. MySQL is smart enough to understand the values without leading zeros when inserting into a DATE field.
0
590
posted 12 years ago by jpkunst
The datetime_field value in the database is '0000-00-00 00:00:00'.
0
500
posted 12 years ago by dsoms
I use something similar to the example to get the difference between statuses in a status log table that I have. It comes in handy when determining the number of days between status changes. This works in MySQL 5.0.
0
792
posted 14 years ago by bradless
« Prev 1 Next »