php - Select a substring (date) and convert it -
I have a column with date format (format) > I use this SQL to take the time for a specific date: It gives me: (from datepicker format) I am creating a website so that the user should see the time associated with a date before I check it Can I convert the wire from the database that it is equivalent to or is it from datepicker to How to get rid of substrings Instead of stuff and use it in Ray, choose This will work because your DateFrom field is stored in standard string format of DATETIME object. You really want to consider changing datatype's date type DATETIME. Hia, and then the column should indexing. Then you have your WHERE clause on And you'll get great performance benefits.
SELECT SUBSTRING (date 5 to 5) From) Date From Date (SUBSTRING) From Date: From 1 To 10 = "'. $ Date." "
HH: MM date $
DD.MM.YYYY
. Date date ?
YYYY.MM.DD instead ?
as the time (date format) from `to` calendar WHERE DATE (datefirm) = STR_TO_DATE ($ date, '% d % M.% Y ')
to Is in bettix because it is a reserved word.
WHERE DateFrom> = STR_TO_DATE ($ date, '% d.% M %% Y') and by date & lt; STR_TO_DATE ($ date, '% d.% M %% Y') + INTERVAL 1 DAY
Comments
Post a Comment