Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Convert date format and append it with Time Post Reply Post New Topic
Author Message
achaithanya
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Location: India
Online Status: Offline
Posts: 10
Quote achaithanya Replybullet Topic: Convert date format and append it with Time
    Posted: 27 Feb 2009 at 6:35am
Hi,
 
I have a requirement of this type. we have In date,In time,Out date,out time. we need to capture all these details and compare them and need to display the time diff.
 
eg:  In Date    5/15/2008 12:00:00 AM
       Out date  5/15/2008 12:00:00 AM
       In Time    5/15/2008 8:00:00 AM
       Out Time  5/15/2008 5:00:00 PM
My formulae should work such that
I need to get Date from In Date and append it with In Time
eg: In DateTime   2008/15/05 08:00
      Out DateTime 2008/15/05 17:00
Here i need to compare these to fields and get the output.
I need to get Time in in the In DateTime,Out DateTime and compare and display the Total time.
 
Can any one of you help me out in solving this.
 
Thank you,
Akki
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 27 Feb 2009 at 6:52am
I'm confused as in your example the in Time has a date associated with it, but if you need to concatenate the 2 fields it is not hard.
 
something like:
datetimevar Start := cdate({inDate}) + ctime({inTime});
 
should work, same for the end time and then you can use a function to determine the difference.
 
Hope this helps.
IP IP Logged
achaithanya
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Location: India
Online Status: Offline
Posts: 10
Quote achaithanya Replybullet Posted: 01 Mar 2009 at 8:10pm
I will try out this option and let you know.
 
Thanks for your reply.
IP IP Logged
achaithanya
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Location: India
Online Status: Offline
Posts: 10
Quote achaithanya Replybullet Posted: 01 Mar 2009 at 11:17pm
Thank you.I got the solution. instead of converting date and time seperately i have the formulae suggested by and i have used Datediff function.
Chaitu
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.