drichter12
Technical User
I have a table in an Access database linked to an SQL table which I use to keep my Access database up to date. The piece I am having trouble with is a "business hours" field which is stored as a single 42 character string which needs to be translated into open and closed hours for every day of the week.
Here is an example of 1 string:
080180080180080180080180080180090170110160
This string translates as follows:
Monday Open - (080) = 8:00AM
Monday Close - (180) - 6:00PM
and so on through Sunday Close - (160) = 4:00PM
I have a query which presents all the fields in the table in a more readable format but am stuck at how to parse this one field into 14 fields which are more usable on the fly. I originally built a lookup table using every iteration of the string with the correct times linked to it but the problem with that is I come up with 452 unique strings currently in use and I am afraid that if someone changes one time entry which creates a new iteration then I will not have it accounted for and the record will no longer report for that location.
Any thoughts or suggestions would be greatly appreciated.
Thanks
Dale
Here is an example of 1 string:
080180080180080180080180080180090170110160
This string translates as follows:
Monday Open - (080) = 8:00AM
Monday Close - (180) - 6:00PM
and so on through Sunday Close - (160) = 4:00PM
I have a query which presents all the fields in the table in a more readable format but am stuck at how to parse this one field into 14 fields which are more usable on the fly. I originally built a lookup table using every iteration of the string with the correct times linked to it but the problem with that is I come up with 452 unique strings currently in use and I am afraid that if someone changes one time entry which creates a new iteration then I will not have it accounted for and the record will no longer report for that location.
Any thoughts or suggestions would be greatly appreciated.
Thanks
Dale