Fast Report - SQL Lite Functions Commonly Use: Difference between revisions

From eStream Software
(Created page with "===01. How to get the date difference results in days using SQL Lite?=== ===Example 1: Payment Date - Invoice Date === ::Payment Date = 05/05/2016 ::Invoice Date = 15/03/2016...")
 
Line 1: Line 1:
===01. How to get the date difference results in days using SQL Lite?===
===01. How to get the date difference results in days using SQL Lite?===
===Example 1: Payment Date - Invoice Date ===
===Example 1: Payment Date - Invoice Date ===
::Payment Date = 05/05/2016
:Payment Date = 05/05/2016
::Invoice Date = 15/03/2016
:Invoice Date = 15/03/2016


Date differences (in days) = 51  
:Date differences (in days) = 51  


{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"

Revision as of 01:46, 6 May 2016

01. How to get the date difference results in days using SQL Lite?

Example 1: Payment Date - Invoice Date

Payment Date = 05/05/2016
Invoice Date = 15/03/2016
Date differences (in days) = 51
Julianday(Date)

(julianday(Date(PaymentDate)) - julianday(Date(InvoiceDate)))