Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Subtracting datetime fields.? Post Reply Post New Topic
Author Message
cbaldwin
Groupie
Groupie


Joined: 09 Apr 2014
Online Status: Offline
Posts: 81
Quote cbaldwin Replybullet Topic: Subtracting datetime fields.?
    Posted: 17 Apr 2017 at 4:24am
When subtracting 2 datetime fields in a Crystal Command table select statement (statement below)

(dd.draw_start_datetime - d.birthdate)/365.25) as age,

i get data in the following format.

+000000041 22:52:55.890410959

Is there a way to manipulate this to display just the "41"? The 41 represents 41 years.

Note that I have to do this within a Crystal Command table using SQL.

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 17 Apr 2017 at 6:48am
What database are you connecting to? The syntax will be based what the database is.

-Dell
IP IP Logged
cbaldwin
Groupie
Groupie


Joined: 09 Apr 2014
Online Status: Offline
Posts: 81
Quote cbaldwin Replybullet Posted: 17 Apr 2017 at 6:52am
Thank you for taking the time to respond. I received a resolution from an offsite user with the same software.
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.031 seconds.