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 revision Previous revision
Next revision
Previous revision
v5:datetime:adodb_date [2015/11/26 15:25]
mnewnham
v5:datetime:adodb_date [2016/01/13 02:12] (current)
mnewnham ↷ Page moved from datetime:adodb_date to v5:datetime:adodb_date
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.1448547949.txt.gz · Last modified: 2017/04/21 11:27 (external edit)