PDA

View Full Version : space in sql value is replaced by letter T



Gunnar
25th September 2010, 19:33
Well, a strange problem.
I've managed to execute several sql commands against the database, but when selecting a timestamp for the first time, I get 2010-09-25T11:11:11. Notice the letter T. Where did that come from? (Qt 4.6, ubuntu, postgresql 8.4.4)
Any ideas on what this might be or how to get rid of it?

The same query executed directly in sql client gives me the correct value.

Could it be some clever replacement of a tab?

tbscope
25th September 2010, 20:08
It's not a bug.
http://en.wikipedia.org/wiki/ISO_8601

Gunnar
25th September 2010, 20:25
Then it must be a feature! ;)

Solved the problem by using QDateTime::fromString() and QDateTime::toString().
Thank you!