Hello All;
I have text file which has the following sample data like below:
facility","scanLocation":"PHILADELPHIA, PA","scanTime":"12:57 AM","GMTOffset":"-05:00","showReturnToShipper":false,"scanDate":"Jan 19, 2012"},{"scanStatus":"Arrived at FedEx location","scanLocation":"PHILADELPHIA, PA","scanTime":"8:51 PM","GMTOffset":"-05:00","showReturnToShipper":false,"scanDate":"Jan 18, 2012"},{"scanStatus":"Picked up","scanLocation":"PHILADELPHIA, PA","scanTime":"12:40 PM","GMTOffset":"-05:00","showReturnToShipper":false,"scanDate":"Jan 18, 2012"}],"rthActive":true,"getLinkText":"Get Link","shipDateISO"
Now i need a Macro which open this text file and find out the "Picked up" and capture the Date time & Picked up.
Example:
1111 - 1/18/2012 12:40 PM - Picked Up
Regards,
NG
Last edited by naven_sg; 01-23-2012 at 02:18 PM. Reason: color
Is this all in one line in the text file, or are these all different lines in the text file?
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
I think you want to tracking some parcels
for establish where is "Picked up" in text I suggest to use built function InStr
let say your text file is loaded into variable text
It is only my point of view, just try to adapt it to your needs.text = "facility","scanLocation":"PHILADELPHIA, PA","scanTime... PickUpPos = InStr(1,text, "Picked up") scanTime = mid(text,InStr(PickUpPos,text,"scanTime")+11,8) msgbox "Scan Time is: " & scanTime
Best Regards
MaczaQ
---------------------------------------------------------------------------------------------------------------------------
If you are satisfied with the solution(s) provided, please mark your thread as Solved
If you are pleased with my answer consider to use the Scales iconto rate it - This way you will add me some reputation points ... thanks in advance.
I think you want to tracking some parcels
for establish where is "Picked up" in text I suggest to use built function InStr
let say your text file is loaded into variable text
It is only my point of view, just try to adapt it to your needs.text = "facility","scanLocation":"PHILADELPHIA, PA","scanTime... PickUpPos = InStr(1,text, "Picked up") scanTime = mid(text,InStr(PickUpPos,text,"scanTime")+11,8) msgbox "Scan Time is: " & scanTime
Best Regards
MaczaQ
---------------------------------------------------------------------------------------------------------------------------
If you are satisfied with the solution(s) provided, please mark your thread as Solved
If you are pleased with my answer consider to use the Scales iconto rate it - This way you will add me some reputation points ... thanks in advance.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks