|
-
Sep 3rd, 2003, 01:20 AM
#1
Thread Starter
Hyperactive Member
RESOLVED: date format for RecordSelectionFormula
I am trying to pass in two dates to my Crystal Report (from VB.Net) and am getting frustrated.
if i run the report with no value in the RecordSelectionFormula parameter, the report works perfectly (showing all data).
By when i add the following lines of code:
Code:
rpt.DataDefinition.RecordSelectionFormula = "{tbl_ClassMaster.cms_Start} >= #" & Format(dtpDisplay.Value, "dd-MMM-yyyy") & " 0:00:00# " & " And " & _
"{tbl_ClassMaster.cms_Start} <= #" & Format(dtpDisplay.Value, "dd-MMM-yyyy") & " 23:59:59# "
I get no data.
In the past, i've always converted dates to the form of #01-sep-2003 16:47:00# because i know that the backend will then convert it to whatever format it likes. if i were to use #03/09/2003# then i can either get data from march or september, depending upon which part of the world my user is in.
any help .....????
cheers.
Last edited by stingrae; Sep 3rd, 2003 at 02:24 AM.
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
-
Sep 3rd, 2003, 02:23 AM
#2
Thread Starter
Hyperactive Member
1 Hour later and this works:
Code:
rpt.DataDefinition.RecordSelectionFormula = "({tbl_ClassMaster.cms_Start} >= #" & Format(dtpDisplay.Value, "dd-MMMM-yyyy") & " 0:00:00#) And " & _
"({tbl_ClassMaster.cms_Start} <= #" & Format(dtpDisplay.Value, "dd-MMMM-yyyy") & " 23:59:59#) "
unbelievable!
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
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
|