Skip to Content.
Sympa Menu

freetds - Datetime format return

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Casey Allen Shobe <cshobe AT secureworks.net>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Datetime format return
  • Date: Sat, 27 Jul 2002 20:30:09 -0400


Hi!

I'm using FreeTDS 0.53 to access Microsoft SQL Server 2000 via PHP.

I have several queries that get data from a datetime field. The format is as
follows:

Jul 27 2002 05:16PM

The problem is that I need it in 24 hour format, in fact something ISO
standard would be highly preferable (I.E. the format I get when using Query
Tool / ODBC on Windows).

Now if I change my statement from:

select date from table

to:

select convert(datetime, date, 5) from table

...Nothing changes in the datetime format, so I'm guessing FreeTDS is
overriding this somewhere. Where/how can I fix this?

Thanks,

--
Casey Allen Shobe / Network Security Analyst & PHP Developer
SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144
cshobe AT secureworks.net / http://www.secureworks.net
Content is my own and does not necessarily represent my company.

"Diagoras the Atheist once visited Samothrace and a friend there said to him,
'You think the gods have no care for humans? Why, you can see from all these
votive pictures here how many people have escaped the fury of storms at sea
by praying to the gods, who have brought them safe to harbour.' 'Yes,
indeed,' said Diagoras, 'but where are the pictures of all those who suffered
shipwreck and perished in the waves?' On another occasion he was on a voyage
and the crew became anxious about the bad weather and began to mutter that it
served them right for taking an atheist on board. Diagoras just pointed out
to them a number of other ships on the same course which were in equal
difficulties and asked them whether they thought that there was a Diagoras on
the passenger-list of every one of them. The fact is that a man's character
or way of life makes no difference at all to his good luck or bad."

- Cicero



  • Datetime format return, Casey Allen Shobe, 07/27/2002

Archive powered by MHonArc 2.6.24.

Top of Page