DavidMarcus
Technical User
We have a field that records the days of the week to which something applies. The field is stored as a number in the range 0 - 127. The field is the base 10 representation of a seven character binary array where each character reprsents a day of the week. For instance,
binary 1000001 means Sunday and Saturday and is stored in the database as 65. Binary 1111111 means every day of the week and is stored as 127.
How can I convert from the decimal number (e.g. 65) to a 7-character string (e.g. 1000001) ?
I've got the reporting problem solved by brute force right now, but I'd like a more elegant solution for future use.
I am using Crystal Reports 8.0 and using RDC to embed them in our applications.
David Marcus
GMT Corporation
binary 1000001 means Sunday and Saturday and is stored in the database as 65. Binary 1111111 means every day of the week and is stored as 127.
How can I convert from the decimal number (e.g. 65) to a 7-character string (e.g. 1000001) ?
I've got the reporting problem solved by brute force right now, but I'd like a more elegant solution for future use.
I am using Crystal Reports 8.0 and using RDC to embed them in our applications.
David Marcus
GMT Corporation