This is the reverse function of the DATE_FORMAT() function. It takes a string str and a format string format. STR_TO_DATE() returns a DATETIME value if the format string contains both date and time parts, or a DATE or TIME value if the string contains only date or time parts. The date, time, or datetime values contained in str should be given in the format indicated by format. For the specifiers that can be used in format, see the table in the DATE_FORMAT() function description. All other characters are just taken verbatim, thus not being interpreted. If str contains an illegal date, time, or datetime value, STR_TO_DATE() returns NULL.
Posted on Friday, Apr 27 at 13:05:01
If you specify an interval value that is too short (does not include all the interval parts that would be expected from the type keyword), MySQL assumes that you have left out the leftmost parts of the interval value. For example, if you specify a type of DAY_SECOND, the value of expr is expected to have days, hours, minutes, and seconds parts. If you specify a value like '1:10', MySQL assumes that the days and hours parts are missing and the value represents minutes and seconds. In other words, '1:10' DAY_SECOND is interpreted in such a way that it is equivalent to '1:10' MINUTE_SECOND. This is analogous to the way that MySQL interprets TIME values as representing elapsed time rather than as time of day. If you add to or subtract from a date value something that contains a time part, the result is automatically converted to a datetime value:
Posted on Friday, Apr 27 at 13:04:24
Maecenas lectus. Duis hendrerit dolor eget arcu. Pellentesque consequat diam. Nulla eleifend, libero eget ultricies rhoncus, felis erat mattis justo, vitae placerat tortor tortor et nisi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur hendrerit iaculis lectus. Vestibulum id nunc eu enim placerat porta. Aliquam in tellus ac turpis feugiat posuere. Praesent sollicitudin. Sed feugiat urna ut lectus. Sed pharetra felis in massa egestas luctus. Suspendisse potenti. Donec pretium.
Posted on Friday, Apr 27 at 13:03:19
Curabitur feugiat luctus metus. Cras egestas dolor quis sem. Fusce placerat pellentesque libero. Phasellus dignissim venenatis leo. Vestibulum egestas. Praesent id sapien. Nullam nisi velit, mattis non, interdum vitae, tristique in, arcu. Nullam lectus. In imperdiet leo et tellus. Proin porta venenatis augue. Mauris libero metus, facilisis ut, feugiat ut, interdum vel, turpis. Mauris tellus. Fusce hendrerit eleifend odio.
Posted on Friday, Apr 27 at 13:01:34
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed consequat elit vitae mi molestie aliquet. Proin ac arcu. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque sollicitudin. Fusce imperdiet sodales erat. Aenean blandit, sapien eu gravida luctus, odio est fringilla est, sit amet dictum dolor nisl vitae elit. Cras a erat. Cras at sem. Aenean at urna eget dolor vulputate placerat. Proin sed orci. Nulla nec nulla. Praesent orci quam, venenatis sed, lobortis mollis, pretium vel, pede. Maecenas molestie cursus est. In blandit magna quis magna.
Posted on Friday, Apr 27 at 12:56:45