|
-
Apr 25th, 2007, 09:11 AM
#1
Thread Starter
Lively Member
[CR VS2005] Crystal Syntax Date Selection.
Hello,
Im trying to generate a Crystal Syntax Query to pass to a Crystal Report.
The value is a Date feild in a Sql Database stored in shortDate format [ 5/26/2009 12:00:00 AM ]
Here is the syntax:
Code:
{EQ_Equipment.equipment_warranty} = DateValue(05/26/2007)
This returns no values. yet that is an exact date in the system.
What is the correct way to build the date syntax correctly to read the Date feild above???
Thanx...
VB.Net uber-noob since04, Yeababy! 
-
Apr 25th, 2007, 09:37 AM
#2
Thread Starter
Lively Member
Re: [CR VS2005] Crystal Syntax Date Manipulation.
OK i fugired out my Error... Missing String single quotes.. 'xx/xx/xxxx'
Now a new problem.
How would i do it if i wanted to search dates using a like clause??
Code:
crystalsyntax = "{EQ_Equipment.equipment_warranty} = Like Date('2009')"
When i use the code above i recive a long error. i have tried diferent itterations DateValue, Date , Cdate. If i just use Like and no date conversion it throws an error on saying.."date, datetime..ect... Is expected here"
Any help apreciated...
VB.Net uber-noob since04, Yeababy! 
-
Apr 27th, 2007, 01:31 PM
#3
PowerPoster
Re: [CR VS2005] Crystal Syntax Date Selection.
Like Date() might have to be something like
year({your feild name}) = like 2009
===================================================
If your question has been answered, mark the thread as [RESOLVED]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|