 |
| Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET). |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 6th, 2007, 11:15 AM
|
|
Registered User
|
|
Join Date: Feb 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
please help vb access date pblm
hi all
im using the following querry for crystal report
rr.SQLQuery = "select * from Table where Format(DateField , 'yyyy/mm/dd' ) >= format ( '" & fromdt & "','yyyy/mm/dd' ) and Format(DateField ,'yyyy/mm/dd') <= format ( '" & todt & "','yyyy/mm/dd' )"
my datefield in database is text type
The pblm is , while selecting the date ranges like 2007/01/31 to 2007/02/01 im not getting the report details for some other ranges
im getting results , tried a few things but didnt clicked
Please help
Renjith
|
|

February 6th, 2007, 11:20 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
hi there..
and you have data for that date range?? you are only showing the records with date 2007/02/01 with that query..
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
|
|

February 6th, 2007, 11:39 AM
|
|
Registered User
|
|
Join Date: Feb 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
HI
Im letting the user to select a date range
Thanks
renjith
|
|

February 6th, 2007, 11:44 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
ok.. that's ok... but the query is failing??? do you have data to show for that specific query??
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
|
|

February 6th, 2007, 11:46 AM
|
|
Registered User
|
|
Join Date: Feb 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
yes offcourse im getting the result if i select the rang 2007/01/31 to 2007/02/06
|
|

February 6th, 2007, 11:50 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
I 'm not following you.. can you explain better where is your problem then???
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
|
|

February 6th, 2007, 11:19 PM
|
|
Registered User
|
|
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
you should make date from ur text field by using date, left, right and mid (text related) functions.
first of all separate the day month and year from text field and than use date function to make it as date
you can use date format of YYYYMMDD format. it is easy to compare range of date by using this format..
regards
bhavesh
Nothing
|
|

February 7th, 2007, 01:18 AM
|
|
Registered User
|
|
Join Date: Feb 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi Gonzalo
my database has enough records , date field in table is of text type , while im generating
report using date range some range gives me exact result but some not like above said ranges
Thanks
renjith
|
|

February 7th, 2007, 01:19 AM
|
|
Registered User
|
|
Join Date: Feb 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi bhavesh
can u give me some example code
Thanks
Renjith
|
|

February 7th, 2007, 03:44 AM
|
|
Registered User
|
|
Join Date: Feb 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi bhavesh
thnks using reply i sorted the pblm
thnks very much
Renjith
|
|
 |