ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:datetime:adodb_date

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
datetime:adodb_date [2015/11/26 15:25] mnewnhamv5:datetime:adodb_date [2016/01/13 02:12] – ↷ Page moved from datetime:adodb_date to v5:datetime:adodb_date mnewnham
Line 12: Line 12:
 ===== Description ===== ===== Description =====
  
-This function converts a timestamp to a formatted local date. If ''$timestamp'' is not defined, the current timestamp is used. Unlike the function date(), it supports dates outside the 1901 to 2038 range.+This function converts a timestamp to a formatted local date. If ''$timestamp'' is not defined, the current timestamp is used. Unlike the function date(), it supports dates outside the 1901 to 2038 range. To produce a date prior to the epoch date, a negative number of seconds prior to that number can be provided 
 +------------------------------------- 
 +===== Usage ====== 
 +<code php> 
 +print adodb_date('d/m/Y'); 
 +/* 
 +* Prints 03/12/2015 
 +*/
  
--------------------------------+print adodb_date('d/m/Y',0); 
 +/* 
 +* Prints 12/31/1969 
 +*/ 
 + 
 +print adodb_date('d/m/Y', -27454896000); 
 +/* 
 +* Prints 12/21/1099 
 +*/ 
 +</code> 
 +===== Available Formats =====
 The format fields that adodb_date supports: The format fields that adodb_date supports:
  
v5/datetime/adodb_date.txt · Last modified: 2023/05/18 18:55 by dregad