Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Best way to remove time from datetime Post Reply Post New Topic
Page  of 2 Next >>
Author Message
TheSaint
Newbie
Newbie
Avatar

Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
Quote TheSaint Replybullet Topic: Best way to remove time from datetime
    Posted: 17 Sep 2012 at 6:55am
Hello everyone,

I was wondering if there was a way, or what is the best way to remove the time from a datetime field?

Thanks

Anthony
Oops...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Sep 2012 at 7:24am
if ity is just a matter of display,
right click on the field,
select format field
select date and time tab
select the date format you want it to look like
 
if you have to convert it
date(field)
IP IP Logged
TheSaint
Newbie
Newbie
Avatar

Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
Quote TheSaint Replybullet Posted: 17 Sep 2012 at 8:05am
I do need to convert it, due to a sorting issue I am having, trying to group sales receipts to time clock punches (which it doesn't like because the times are different). I will try to use the date(field) conversion and see what we get. Thanks for showing me the way!
Oops...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Sep 2012 at 8:11am
you can group on a date time setting it to days and ignoring the time
IP IP Logged
TheSaint
Newbie
Newbie
Avatar

Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
Quote TheSaint Replybullet Posted: 17 Sep 2012 at 8:30am
It doesn't seem to like that, I am able to properly group my time clock entries, but when I place the sales in there, it is not constricting them to the proper date.
Oops...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Sep 2012 at 8:32am
are you sure it is a real datetime field and not a string that has a datetime string in it?
IP IP Logged
TheSaint
Newbie
Newbie
Avatar

Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
Quote TheSaint Replybullet Posted: 17 Sep 2012 at 9:06am
Both are showing in Crystal as a DateTime fields when I have it show field types. Could it have something to do with my parameters? Another thing I noticed is that when I add the time clock entries to the report, it causes my sales to duplicate themselves so that they show up twice.
Oops...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Sep 2012 at 9:18am
i was wondering about this...
are your joins set up correctly?
Crystal does not enforce joins until a field is used from both the tables in the join or unless you enforce it in the join set up itself.
IP IP Logged
TheSaint
Newbie
Newbie
Avatar

Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
Quote TheSaint Replybullet Posted: 17 Sep 2012 at 9:23am
Well if I linked the tables by date, it completely freaked out and didn't give me any information. I did link them by employee ID.
Oops...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Sep 2012 at 9:25am
I don't know your data structure so I can't help too much with the approriate linking but I can tell you it is critical to get that right. If it is not "correct" for your expected data set then no amount of crystal formula writing will help fix it.
IP IP Logged
Page  of 2 Next >>
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.035 seconds.