Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Date Field Crystal 2008 Post Reply Post New Topic
Author Message
pgreer
Newbie
Newbie
Avatar

Joined: 10 Nov 2010
Location: United States
Online Status: Offline
Posts: 7
Quote pgreer Replybullet Topic: Date Field Crystal 2008
     Posted: 14 Dec 2010 at 8:48am
Hi,
 
    I have an issue where the database field (paudit.date) is formatted yyyymmdd and there is no date field.  I have a parameter fields for start date{?StartDate} and End Date {?EndDate}.  The parameter field is mm/dd/yyyy.  Do i need to convert this date with CDate(YYYY,MM,DD) since in the crystal 2008 i do not see a date format field for yyyymmdd ?  This is what i have and i am getting a missing ")" and i don't see where.
 
CDate (YYYY,MM,DD){PAUDIT.DATE} in {?StartDate} to {?EndDate}
 
Thanks for your responses,
 
PG
 
 
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Dec 2010 at 3:12am
local numbervar yr := val(left({PAUDIT.DATE},4));
local numbervar mo := val(mid({PAUDIT.DATE}, 5,2));
local numbervar da := val(right({PAUDIT.DATE},2));
 
CDate (yr,mo, da) in {?StartDate} to {?EndDate}
 
you can put all the val(xxxx({table.field})) inside the CDate() or you might try:
 
CDate({PAUDIT.DATE}) in {?StartDate} to {?EndDate}
 
and see if that works.
 
HTH
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