ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:datetime:adodb_date2

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_date2 [2015/12/03 22:43]
mnewnham
v5:datetime:adodb_date2 [2016/01/13 02:12] (current)
mnewnham ↷ Links adapted because of a move operation
Line 3: Line 3:
 <WRAP right box> <WRAP right box>
 == See Also == == See Also ==
-[[datetime:​adodb_date|adodb_date()]]+[[v5:datetime:​adodb_date|adodb_date()]]
 == Syntax == == Syntax ==
   string adodb_date2(   string adodb_date2(
Line 11: Line 11:
 </​WRAP>​ </​WRAP>​
 ===== Description ===== ===== Description =====
-This function extends the adodb_date() function, allowing the second argument to be passed as an ISO format string instead of a timestamp. This makes it easier to generate formatted times outside of the normal unix timestamp range. To make the calculation work correctly for early years, it is important to use 4 digit years for the ''​$isoDateString''​+This function extends the adodb_date() function, allowing the second argument to be passed as an ISO format string instead of a timestamp. This makes it easier to generate formatted times outside of the normal unix timestamp range. ​ 
 +---------------------------------- 
 +===== Usage ===== 
 +<code php> 
 +$d = adodb_date2('​d-M-Y H:​i','​1520-12-25 13:​01:​34'​);​ 
 +</​code>​ 
 +===== Note ===== 
 + 
 +To make the calculation work correctly for early years, it is important to use 4 digit years for the ''​$isoDateString''​ 
 +-----------------------------------------------
 <code php> <code php>
 /* /*
Line 28: Line 37:
 * Returns 12/03/2015 (todays date) * Returns 12/03/2015 (todays date)
 */ */
- 
- 
----------------------------------- 
-===== Usage ===== 
-<code php> 
-$d = adodb_date2('​d-M-Y H:​i','​1520-12-25 13:​01:​34'​);​ 
 </​code>​ </​code>​
 +
v5/datetime/adodb_date2.1449178991.txt.gz · Last modified: 2017/04/21 11:27 (external edit)