From 3977ea83c4ef862481423ac95adfe09aa06e67eb Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Tue, 6 May 2025 14:10:52 -0300 Subject: [PATCH 1/2] Document Pdo\Dblib::ATTR_DATETIME_CONVERT I've had users ask me about how to do this in PDO_DBLIB, and it turns out it can do this, but it's not documented. Do that. --- reference/pdo_dblib/pdo-dblib.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reference/pdo_dblib/pdo-dblib.xml b/reference/pdo_dblib/pdo-dblib.xml index 60ad7638cef1..640000610042 100644 --- a/reference/pdo_dblib/pdo-dblib.xml +++ b/reference/pdo_dblib/pdo-dblib.xml @@ -134,6 +134,13 @@ Pdo\Dblib::ATTR_DATETIME_CONVERT + This connection attribute controls the format of strings for datetime + types. When this is &false;, PDO_DBLIB will return a datetime type as a + string in the format that SQL Server returns it in. When &true;, + PDO_DBLIB will convert the datetime type into a string using a + user-defined or locale format, as specified in the FreeTDS + locales.conf file. By default, this attribute is + &false;. From 4060f4e9ab67652d1ca3fc1e281b608758c12ad4 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Tue, 6 May 2025 14:18:52 -0300 Subject: [PATCH 2/2] Include example of SQL Server format --- reference/pdo_dblib/pdo-dblib.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/reference/pdo_dblib/pdo-dblib.xml b/reference/pdo_dblib/pdo-dblib.xml index 640000610042..c492440c54e4 100644 --- a/reference/pdo_dblib/pdo-dblib.xml +++ b/reference/pdo_dblib/pdo-dblib.xml @@ -136,11 +136,11 @@ This connection attribute controls the format of strings for datetime types. When this is &false;, PDO_DBLIB will return a datetime type as a - string in the format that SQL Server returns it in. When &true;, - PDO_DBLIB will convert the datetime type into a string using a - user-defined or locale format, as specified in the FreeTDS - locales.conf file. By default, this attribute is - &false;. + string in the format that SQL Server returns it in (i.e. + "2017-10-27 10:22:44"). When &true;, PDO_DBLIB will + convert the datetime type into a string using a user-defined or locale + format, as specified in the FreeTDS locales.conf file. + By default, this attribute is &false;.