Difference between revisions of "DateTime daysBetween"

From Catglobe Wiki
Jump to: navigation, search
(DateTime_daysBetween)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:General_Functions]]
 
[[Category:General_Functions]]

+
{{HelpFiles}}
 
+
__NOTOC__
====DateTime_daysBetween====
+
==DateTime_daysBetween==
  
 
Return days between 2 datetimes
 
Return days between 2 datetimes
Line 25: Line 25:
 
'''Example'''
 
'''Example'''
  
array a1 = {2009,5,4,10,10,10,10,19,57};
+
array a1 = {2015,10,22,3,2,9,418,43,0};
  
array a2 = {2009,5,7,12,12,12,10,23,57};
+
array a2 = {2015,10,28,3,2,9,418,43,0};
  
 
number timezoneid = 40;
 
number timezoneid = 40;
Line 33: Line 33:
 
print(DateTime_daysBetween(a1,a2,timezoneid));
 
print(DateTime_daysBetween(a1,a2,timezoneid));
  
// result =3
+
// result = 6
 
 
'''Availability'''
 
 
 
Version 5.7
 
__NOTOC__
 
<!-- imported from file: 7529.htm-->
 

Latest revision as of 04:05, 22 October 2015



DateTime_daysBetween

Return days between 2 datetimes

Syntax

DateTime_daysBetween(datetime1, datetime2, timezoneId)

or

DateTime_daysBetween(datetime1, datetime2)

Arguments

  • datetime1, datetime2: are array in which we get day span
  • timezoneId: is number. It is timezone Id

Return value

number

Example

array a1 = {2015,10,22,3,2,9,418,43,0};

array a2 = {2015,10,28,3,2,9,418,43,0};

number timezoneid = 40;

print(DateTime_daysBetween(a1,a2,timezoneid));

// result = 6