Author |
Message |
TheSaint
Newbie
Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
|
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 Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
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 Logged |
|
TheSaint
Newbie
Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
|
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 Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 17 Sep 2012 at 8:11am |
you can group on a date time setting it to days and ignoring the time
|
IP Logged |
|
TheSaint
Newbie
Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
|
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 Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
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 Logged |
|
TheSaint
Newbie
Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
|
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 Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
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 Logged |
|
TheSaint
Newbie
Joined: 30 Aug 2012
Online Status: Offline
Posts: 8
|
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 Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
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 Logged |
|
|