Joined: 03 Oct 2010
Location: United Kingdom
Online Status: Offline
Posts: 76
Topic: Difference between 2 dates Posted: 20 Mar 2016 at 1:56am
Hi
I needed to count the number of working days between 2 dates. On the forum I found the correct solution using datediff and creating DateTimeVar
DateTimeVar Order_Date := {SALES_ORDER.ORDER_DATE};
DateTimeVar Ex_Works_Date :={SALES_ORDER.DESPATCH_DATE};
My question is: why do I have to create a datetimevar when the actual variable would work just the same?
It's just something a see more experienced users using and just wondered why.
Thanks
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 21 Mar 2016 at 5:59am
I have only needed DateTimevar when the time mattered (i.e., date difference in hours). Of course if the database fields are datetime and you just want use the date part, then you might need to convert the fields to dates to use a DateVar variable.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum