Re: Conert MySQL date stamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bimal Pouldel wrote:

> Hi there,
> 
> I have to work extremely with the dates in the database; MySQL.
> The general format is : YYYY-MM-DD HH:MM:SS, when we use DATE
> datatype for mysql.
> 
> I want to have a number out of this string like database, so
> that I can sort the database results based on the Hour, and
> munites. If a good idea is not possible, should I use the PHP to
> get the date, calculate the different values like year, date,
> minutes and get the number?
> 
> =========
> This program is specailly used with the issues like, logging
> information, where I store the date("Y-m-d h-i-s") into the
> database. I want to get the hour and minute values out there.
> ======
> 
> If there is a better way, please let me know.
> 
> Thanx
> 
> =====
> Bimal Poudel
> (Information Management)
> Kathmandu, Nepal
> 
> http://fakenepal.tripod.com
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail 
> 
> 
> 
> PHP Data object relational mapping generator - http://www.meta-language.net/ 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
You can use SQL queries to just pull the hours and minutes as well as do 
  basic calculations:

http://dev.mysql.com/doc/mysql/en/Date_calculations.html



-- 
-------LDS--------LDS--------LDS-------

Tech@LitigationDataServices.com
Litigation Data Services, PLC

-------LDS--------LDS--------LDS-------


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux