Changeset 52 for www/global.php


Ignore:
Timestamp:
Feb 24, 2008, 3:18:56 PM (17 years ago)
Author:
george
Message:

Přidáno: Funkce pro vygenerování faktur za tři předchozí měsíce.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/global.php

    r48 r52  
    4545{
    4646  return(date('Y-m-d H:i:s', $Time)); 
     47}
     48
     49function MysqlDateTimeToTime($Time)
     50{
     51  $Parts = explode(' ', $Time);
     52  $DateParts = explode('-', $Parts[0]);
     53  $TimeParts = explode(':', $Parts[1]);
     54  $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[2], $DateParts[0]);
     55  return($Result); 
     56}
     57
     58function MysqlDateToTime($Time)
     59{
     60  return(MysqlDateTimeToTime($Time.' 0:0:0')); 
    4761}
    4862
Note: See TracChangeset for help on using the changeset viewer.