Jan 29, 2002 #1 gabster Programmer Oct 23, 2001 192 US Anyone knows what format should have a date range parameter passed from VB code to CR? I am reading the dates from a XML file with the VB appp and then I pass them to CR. Thanks you. Gabi.
Anyone knows what format should have a date range parameter passed from VB code to CR? I am reading the dates from a XML file with the VB appp and then I pass them to CR. Thanks you. Gabi.
Jan 30, 2002 #2 papakula Programmer Aug 21, 2001 33 GB the format is "YYYY,MM,DD" Upvote 0 Downvote
Jan 30, 2002 Thread starter #3 gabster Programmer Oct 23, 2001 192 US I get a type mismatch error when I try to use this date format. CustomerReport.ParameterFields(1).AddCurrentValue "1968,12,21" Thanks, Gabi. Upvote 0 Downvote
I get a type mismatch error when I try to use this date format. CustomerReport.ParameterFields(1).AddCurrentValue "1968,12,21" Thanks, Gabi.
Jan 30, 2002 #4 jgaull1 Programmer Jan 30, 2002 2 US There are many bugs in crystal when using a date as a parameter. I've given up and now pass the date as a string. I pass '01 30 2001' to my stored procedures and then use the SQL to add the slashes back in. SELECT @AsOf = substring(@AsOf,1,2) + '/' + substring(@AsOf,4,2) + '/' + substring(@AsOf,7,4) Hope this helps. Upvote 0 Downvote
There are many bugs in crystal when using a date as a parameter. I've given up and now pass the date as a string. I pass '01 30 2001' to my stored procedures and then use the SQL to add the slashes back in. SELECT @AsOf = substring(@AsOf,1,2) + '/' + substring(@AsOf,4,2) + '/' + substring(@AsOf,7,4) Hope this helps.
Jan 31, 2002 Thread starter #5 gabster Programmer Oct 23, 2001 192 US Thanks a lot!!! I tried this and it worked: CustomerReport.ParameterFields(1).AddCurrentValue CDate("1980,10,17" Now the only question remains, how should I code in VB if I want to pass a date range Gabi. Upvote 0 Downvote
Thanks a lot!!! I tried this and it worked: CustomerReport.ParameterFields(1).AddCurrentValue CDate("1980,10,17" Now the only question remains, how should I code in VB if I want to pass a date range Gabi.
Feb 1, 2002 #6 chelseatech Instructor Aug 25, 2001 1,812 NZ One format I've found works is Date(2001,12,31) As a string and the Word "Date" in that form... Editor and Publisher of Crystal Clear http://www.chelseatech.co.nz/pubs.htm Upvote 0 Downvote
One format I've found works is Date(2001,12,31) As a string and the Word "Date" in that form... Editor and Publisher of Crystal Clear http://www.chelseatech.co.nz/pubs.htm
Feb 4, 2002 Thread starter #7 gabster Programmer Oct 23, 2001 192 US Thanks a lot for help! Gabi. Upvote 0 Downvote