You are here: Re: Convert text to mysql date format « PHP SQL « IT news, forums, messages
Re: Convert text to mysql date format

Posted by Rich on 01/19/07 18:27

On Tue, 16 Jan 2007 19:53:55 +0100, hennie wrote...
>
>How can i convert a date in text format into a date format that is accepted
>by msql?
>
>I have 3 values for day, month and year
>
>I combine them to a date string $date1=$year."-".$month."-".$day;
>
>How do i go further to make $date1 suitable for mysql?
>
>Thanks in advance, Hennie
>
>


May want to check the type of field you have in your database. If it's setup as
a date or time based column that you should be fine. If it's setup as a plain
text field though, then the data would probably get there, but may not operate
right with SQL queries.

Rich
--
Newsguy.com - Basic Accounts $39.95 / 12 months
75+ days of Binary and Text Retention
http://newsguy.com/overview.htm

 

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

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