Re: Different MSSQL output date format from the same PHP script
- From: Alessandro <faglia@xxxxxxxxx>
- Date: Tue, 19 Feb 2008 03:13:28 -0800 (PST)
On 19 Feb, 10:55, Toby A Inkster <usenet200...@xxxxxxxxxxxxxxxxx>
wrote:
Alessandro wrote:
I have a Windows Server 2003 R2 SP2 box where MS SQL 2000 SP4 is
running.
Using MSSQL, you are really best off specifying your desired date format
as part of the query itself. e.g.
SELECT CONVERT(varchar(20),my_date,20) AS my_date
FROM my_table
I agree with you approach. Unfortunately I have many queries of this
kind:
SELECT * FROM my_table
and I display datetime columns with instructions like the following:
echo "DATE1: ".date("d/m/Y",strtotime($row[DateTimeColumn1]));
I have to parse all my scripts (too many) and change both the query
and the echo argument...
.
- Follow-Ups:
- Re: Different MSSQL output date format from the same PHP script
- From: Jerry Stuckle
- Re: Different MSSQL output date format from the same PHP script
- References:
- Different MSSQL output date format from the same PHP script
- From: Alessandro
- Re: Different MSSQL output date format from the same PHP script
- From: Toby A Inkster
- Different MSSQL output date format from the same PHP script
- Prev by Date: Re: A new forum for technical questions - Register Free
- Next by Date: Re: Different MSSQL output date format from the same PHP script
- Previous by thread: Re: Different MSSQL output date format from the same PHP script
- Next by thread: Re: Different MSSQL output date format from the same PHP script
- Index(es):