You are here: Re: Change Datetime value « PHP SQL « IT news, forums, messages
Re: Change Datetime value

Posted by J.O. Aho on 10/22/06 05:30

Desert Rider wrote:
> Unfortunately my data from the previous entries does not have
> timestamps available, only month, day, year and TOD (24 hr). I really
> need something that allows me to enter a date and time e.g. 4/21/2003
> 23:25 and then returns the proper timestamp in seconds since
> 01/01/1970. I could then enter that in the date>value field and it
> would put that date/time on the entry. I've done some googleing and
> have found various references to programming that will do that but way
> beyond my expertise. Even if I could find something that would
> accurately give me the amount of days say between 01/01/1970 and say
> 4/21/2003 I could then compute the seconds and then add the additional
> time for that day. Alas, I'm numeracy challanged and so require
> something pretty simple.

You can use DATEDIFF() to get differences between two dates/times or you can
directly use UNIX_TIMESTAMP().

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

//Aho

 

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

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