Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Mid function issues Post Reply Post New Topic
Author Message
gooker
Newbie
Newbie
Avatar

Joined: 29 Mar 2011
Online Status: Offline
Posts: 11
Quote gooker Replybullet Topic: Mid function issues
     Posted: 13 Dec 2011 at 4:46am
I have a field that contains the date and the time named Einfo,hiredate and it reads this way.
11/30/2006  12:00:00AM
I am trying to remove the time by using the 'mid' function, but I can't seem to get the parens correct. suggestions? Or am I using the wrong function?
Gooker


Edited by gooker - 13 Dec 2011 at 4:46am
Gooker
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 13 Dec 2011 at 6:13am
if you have copied the field from the database, you can always format by right clicking on the field, and setting the date format like in excel.
 
otherwise
 
dateadd(dd, -datediff(dd, <mydatecolumn>, 1), 1)

IP IP Logged
gooker
Newbie
Newbie
Avatar

Joined: 29 Mar 2011
Online Status: Offline
Posts: 11
Quote gooker Replybullet Posted: 13 Dec 2011 at 6:26am
Worked like a charm, thanks.
G
Gooker
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 13 Dec 2011 at 6:42am
Good, glad to help
IP IP Logged
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