I need to get a date with SQL Server datetime , and then format the date. (i.e. 01-Jan-2000 ) I am using PHP.
datetime
01-Jan-2000
SQL is currently returning 2009-02-13 22:00:00.000 .
2009-02-13 22:00:00.000
echo date('dM-Y', strtotime($datetime_from_db));
You can combine the date in any format that you want to receive directly from mySQL query,
SELECT DATE_FORMAT(column_name, '%d-%b-%Y') FROM tablename
Source: https://habr.com/ru/post/1338203/More articles:What caused the NullReferenceException in WpfXamlLoader.TransformNodes ()? - wpfHELP! I don't know binary, hexadecimal, octal and bit wise - binaryHow to automatically identify tags (keywords) from a given text? - algorithmsearch for the average in C - cPython, separation lines - pythonBash create a variable and then assign a value to it - linuxhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1338205/how-to-add-months-to-the-date-without-calendar&usg=ALkJrhi5k7x42yZqfe-VMb7oXuz4i7e1RAhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1338206/cannot-open-database-aspnetdb-requested-by-the-login-the-login-failed-login-failed-for-user-philip-desktopphilip&usg=ALkJrhg5HoYvjD907uTc_BfZNSxeIyyhhwHow to set CheckBox.IsChecked based on the existence of a linked object in a list - checkboxHow to determine the OpenID username when the identifier does not have a username? - openidAll Articles