Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: convert date field to mm/dd/and current year Post Reply Post New Topic
Author Message
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Topic: convert date field to mm/dd/and current year
     Posted: 08 Jun 2009 at 2:06pm
help (and I am sure this is easy!)..
 
I have a database field called STRTDATE
 
I need to keep the MMDD from STRTDATE and add in the YYYY as the current year ... any ideas on which date format to use?
 
Thanks in advance,
J
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2009 at 2:44pm
dateadd("yyyy",datediff("yyyy",{table.StrtDate},currentdate),{table.StrtDate})
You can format it anyway you want after you get the value with the above formula
IP IP Logged
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Posted: 09 Jun 2009 at 6:19am

Thanks so much!!! It works like a charm

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