You are here: Re: date problem « PHP Programming Language « IT news, forums, messages
Re: date problem

Posted by iulian.ilea on 10/08/06 20:45

Thanks all for your replyes.

I can't fix it from SELECT because I have SELECT * FROM... I have more
than one field with datetime type, and more than one table that uses
the same sql statement only customed after the table name.

example:
table1:
field1 - int
field2 - datetime
field3 - int
....

table2
field1 - datetime
field2 - int
....

So I don't know from what table is selecting to write SELECT field1,
field2, other_fields from table1. It's generical, it's a kernel who
generates HTML code based on several sql statements.

I don't know if I made me clear enough, I hope so.

But, the problem is when I retrieve value from DB. Because is stored
correctly there. I have no clue about what can be the problem.

It's the same ini file. I looked over phpinfo() on both servers and on
the one with problem I have this: Default timezone Europe/Paris. The
other one hase Europe/Helsinky. You thin this can be a problem? How can
it be fixed?

Todd wrote:
> Can't give you the exact why, but you can fix it in your SQL Select
> statement.
>
> "SELECT CONVERT(VARCHAR, yourDateField, 101) FROM yourTable"
>
> Will return your date value in the mm/dd/yyyy format.
>
> See http://msdn2.microsoft.com/en-us/library/ms187928.aspx
>
> For more details.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация