|
-
Oct 20th, 2006, 02:52 AM
#1
Thread Starter
Addicted Member
DateTime
Greetings
I'm trying to generate a report that returns records by comparing DateTime
I'm using selection formula: {TransactionByAmount.mesg_crea_date_time} >= DateTime('" & Dt1 & "') and {TransactionByAmount.mesg_crea_date_time} <= DateTime('" & Dt2 & "') "
Dt1 and Dt2 are 2 variables
Comparing the date works fine but comparing time is incorrect
any help appreciated
thank u
-
Oct 20th, 2006, 03:24 AM
#2
Fanatic Member
Re: DateTime
use "#" intead of "'" to compare date
WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST 
-
Oct 20th, 2006, 03:55 AM
#3
Re: DateTime
 Originally Posted by waelr
Greetings
I
Comparing the date works fine but comparing time is incorrect
any help appreciated
thank u
Just watch the crystal report tutorial at my signature on the post 2 ,
post 2 is related to the date example
where i give the example that how to find the value between two date
hope it will help ful for you
Link at my signature
-
Oct 20th, 2006, 03:59 AM
#4
Re: DateTime
 Originally Posted by shukla
use "#" intead of "'" to compare date
Hi shukla
This wiil not work in the crystal report if you are not using the selection formula for comparing the date see the link at my signature related to the crystal report ,post2
-
Oct 20th, 2006, 04:29 AM
#5
Fanatic Member
Re: DateTime
hello shakti
i think by using between clause and "#" statement it will definately going to be work.
VB Code:
{TransactionByAmount.mesg_crea_date_time} between #" & Dt1 & "# and #" & Dt2 & "# "
WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST 
-
Oct 20th, 2006, 04:32 AM
#6
Fanatic Member
Re: DateTime
by the way.
HAPPY DIWALI
ALL OF YOU.
WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST 
-
Oct 20th, 2006, 04:43 AM
#7
Hyperactive Member
-
Oct 20th, 2006, 04:49 AM
#8
Re: DateTime
 Originally Posted by shukla
hello shakti
i think by using between clause and "#" statement it will definately going to be work.
VB Code:
{TransactionByAmount.mesg_crea_date_time} between #" & Dt1 & "# and #" & Dt2 & "# "
Hi shukla
I test this code but some time in the crystal report search this wil not give the batter result
so in the selection formula i change the code
you check this code at my signature at the post 2 in the crystal report tutorial
Happy Deepawali to you
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
|