Show Bid Request
Code to pull records with dates between...
Bid Request Id: 21700
|
|
|
Posted by: |
infomed (37 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 14.81%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Jul 14, 2002 9:34:57 PM EDT
|
Bidding Closes: |
Jul 28, 2002 9:43:45 PM EDT
|
Viewed (by coders): |
1111 times
|
|
|
|
Description:
I need the sql statement to place in the following code to pull all records where DoS (Date of Service)is between DatePicker1 and DatePicker2. In other words, I want to pull all dates between datepicker1 THROUGH DatePicker2 using the DoS field in my Table, "TableService".
The database is Access2000 (I don't need any of the connecting code, I've got all that. Just the SQL statement that will grab all records with dates falling between the datepickers. The datepickers are long format in VB6. The DoS field have dates saved also in long format (e.g., 07/08/2002 11:32:55 AM).
Private Sub PullDates()
Dim cnn1 As ADODB.Connection Dim strQry As String Dim rsDoS As ADODB.Recordset strQry = "SELECT * from TableService WHERE DoS '...this is the code I'm looking for...
Set cnn1 = New ADODB.Connection cnn1.ConnectionString = g_ADOconnectionstring cnn1.Open
Set rsDoS = GetRecordSet(cnn1, strQry)
'Here I do some stuff with the returned rsDoS
Set cnn1 = Nothing Set rsDoS = Nothing
End Sub
Also, my DatePickers are in long date format and I have maybe 10 to 20 records I want pulled
I realize this is pretty simple, I just cant figure it out!
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Complete copyrights to all work purchased.
Platform:
windows
Special Conditions / Other:
Cheap and quick will get my bid (e.g., less than 5 or 10 dollars). Thanks!
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$5 (USD)
|
Jul 15, 2002 5:05:28 PM EDT
|
9.8
(Excellent)
|
|
|
The issue is how dates are formated in in Access. It demands that date literals are in US format (day/month/year). This cause problems when your app is running in a locale (most everywhere else) that represents date in another format.
I've attached my SQLHelper module which formats dates, times and strings for use in SQL statements.
|
|
|
|
|
N/A
|
Jul 15, 2002 5:22:40 PM EDT
|
9.8
(Excellent)
|
|
|
Sorry, I forgot to attach the software. |
|
Attached File
|
|
|
|
|