Results 1 to 3 of 3

Thread: [CR VS2005] Crystal Syntax Date Selection.

  1. #1

    Thread Starter
    Lively Member smilbuta's Avatar
    Join Date
    Apr 2005
    Location
    Orlando
    Posts
    104

    [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!

  2. #2

    Thread Starter
    Lively Member smilbuta's Avatar
    Join Date
    Apr 2005
    Location
    Orlando
    Posts
    104

    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!

  3. #3
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    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
  •  



Click Here to Expand Forum to Full Width