User Profile
Collapse
-
This will work. thank you for your time and assistance. Sorry it took me a while to get my point across. -
-
Yes, VBA code to convert the DateTime field to the RevisedDateTime Date field in the table only. This way I can pull information by Month and Date later. This unfortunately will be working on a very large table which is why I thought it would be better to just make the conversion to a new field in the table than to just show it in a form.
The data at this moment resides all in the same table. I will be generating reports off this data...Leave a comment:
-
I don't mean to be difficult, this is all new to me. I have bought books and tutorials to learn. I can do this all with queries in Access, but I want to do the entire program in Script.Having queries on top of queries has gotten quite confusing.
The only thing I was hoping to do is have a script that would convert that field to a recognizable date. I truly don't know what to do with the information you provided. What more information...Leave a comment:
-
Here is what I put into the code:
I did put the from statement in there and was getting the same error message.Code:DoCmd.RunSQL "SELECT CDate(Left([DateTime],2) & ' ' & Mid([DateTime],3,3) & ' 20' & Mid([DateTime],6,3) & Mid([DateTime],9,2) & ' ' & Mid([DateTime],11,2) AS RevisedDateTimeDate FROM tblConvMTRL"
Leave a comment:
-
Good point. Still learning, but I thought I could put it in a Docmd.runsql statement as is. Not sure what else needed to be added.
ThanksLeave a comment:
-
Thank you for the quick reply, I am getting a Run-time error 3075 for a Syntax error (missing operator). Any idea as to what I did wrong?Leave a comment:
-
VBA SQL query to convert data in a field.
I receive data from another program which I am unable to change. I am trying to create an VBA SQL query in Access '03 that will convert a field that has a date which is in an unrecognizable format. It consists of DayMonthYear and Time. I just need to get the date to a new field called RevisedDateTime Date. Any suggestions would be greatly appreciated.
...Code:DateTime RevisedDateTimeDate 15OCT08 0840 10/18/08
-
ADezii......You ROCK!!!! Works like a champ. Thank you very much!!!!!...Leave a comment:
-
Thanks again for all your time and help on this. I have been combing through 15 thousand records and going cross eyed because of it. This script will definitely become a lifesaver.
Can you recommend any books or tutorials to start learning VB?...Leave a comment:
-
Part 4 started on 1/1 and ended on 1/4. So the breakdown would be 16 hours (8am to Midnight) on day one, 24 hours on day 2, 24 hours on day 3, and 10 hours 35 minutes (Midnight to 10:35 am) on day 4.
...Code:Day Part Hours Minutes 1 1 3 10 4 16 0 2 2 4 17 3 9 0Leave a comment:
-
Thank you for putting the time in on this. Unfortuneately the results you show dont match up with what we mentioned earlier. 1/4/08 should be 11 hours 35 minutes, and 1/1/ should have a lot more than 6 hours on it.
Sorry to be a bother....Leave a comment:
-
Thank you very much. If it would be faster, just have it calculate the times and put them in a different table. It can be named tblPartsTime, with fields names: date, totalTime. Whatever is easiest for you.
Thanks again....Leave a comment:
-
You are correct with 27 hours and 17 minutes. My math was way off. How difficult would it be to create something?...Leave a comment:
-
Sorry, it was thought up after this was done. You know how it goes.
Here is the sample data. If it would be easier you can put the date and time in the same record. Also, the output can have hours and minutes in separate columns, or just output in total minutes. Whichever is easier for you.
...Code:P/NStartDate EndDate StartTime EndTime 1 1/1/2008 1/1/2008 9:10 12:20 2 1/2/2008 1/2/2008 10:19 14:36
Leave a comment:
-
It worked perfectly, thank you!
Hindsight is 20/20, but if I add the date_time_start ed and date_time_compl eted in separate columns, would it be difficult to have it calculate hours and minutes per day parts were worked. Instead of calculating the number of parts, figure how much time was worked each day. The biggest problem would be if a part is in the shop more than a couple of days, 24 hours would have to be added to each day. ...Leave a comment:
-
I do not have very much experience in VBA, How would I go about creating this?...Leave a comment:
-
Count number of events daily within a date range.....
In my Access '03 table I have three columns. P/N, StartDate,EndDa te. Most of the time the start date and the end date are the same. Occasionally the end date can than a couple of days from the start date. I am trying to chart my workload for each day. So if a part is in the shop for 4 days, it gets counted for all 4 days.
...Code:P/N StartDate EndDate 1 1/1/08 1/1/08
-
Thank you very much for your time and assistance, the query worked perfectly. I apologize for the duplicate posting.
Would it be too much to ask for a little more help with this?
I would like to add one more field [location] in the results as to where the product was purchased. The location field is in the same table as the rest of the data. Just not sure how to incorporate the field into the query as to not skew...Leave a comment:
-
Sorry, you are correct. I was trying to reword the problem I was having. The responses on the other thread worked perfectly. Thank you so much!Leave a comment:
No activity results to display
Show More
Leave a comment: