Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Difference between 2 dates Post Reply Post New Topic
Author Message
brockloch
Groupie
Groupie


Joined: 03 Oct 2010
Location: United Kingdom
Online Status: Offline
Posts: 76
Quote brockloch Replybullet 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

Ed
brockloch
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet 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.
IP IP Logged
brockloch
Groupie
Groupie


Joined: 03 Oct 2010
Location: United Kingdom
Online Status: Offline
Posts: 76
Quote brockloch Replybullet Posted: 21 Mar 2016 at 12:23pm
Thanks for your help
brockloch
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.000 seconds.