Binary Coded Decimal

1. Junior Member
Join Date
Dec 1969
Posts
11

## Binary Coded Decimal

I was wondering if there was a VB/VBScript function to convert a decimal to a Binary Coded Decimal. I need to take a time value and covert it over to BCD. IE 11:59PM would be 35 : 89.<BR><BR>Thanks<BR>

2. Senior Member
Join Date
Dec 1969
Posts
2,930

## how'd you get 35:89?

wouldn&#039;t it be... 17:25 with bcd<BR><BR>http://www.osdata.com/topic/language/asm/bcdarith.htm

3. Senior Member
Join Date
Dec 1969
Posts
11,334

## *** is 35:89?

Not even close to binary.

4. Senior Member
Join Date
Dec 1969
Posts
2,930

## RE: *** is 35:89?

http://www.osdata.com/topic/language/asm/bcdarith.htm<BR><BR>binary CODED DECIMAL... read that, you&#039;ll see

5. Senior Member
Join Date
Dec 1969
Posts
11,334

## Ah

Then why not just whole numbers? That&#039;s what we do to prevent rounding problems...<BR><BR>Anyone who has seen Superman III or Office Space should know about that :)

6. Junior Member
Join Date
Dec 1969
Posts
11

## RE: how'd you get 35:89?

17 is 11 am<BR><BR>35 is 11 pm<BR><BR>its a 24 hour clock

7. Senior Member
Join Date
Dec 1969
Posts
2,930

## well, this is a simple example

hehehe office space:<BR><BR>"PC LOAD LETTER!!! *** DOES THAT MEAN??!?!?!??!"

8. Senior Member
Join Date
Dec 1969
Posts
11,334

## 35 > 24

11AM = 11<BR>11PM = 23<BR><BR>Somethin&#039; I&#039;m missing?

9. Senior Member
Join Date
Dec 1969
Posts
11,334

## I love Kung Fu

Or<BR><BR>You don&#039;t have your 15 pieces of flare. Classics.<BR><BR>Though I am living the movie right now.... come in, and space out for about an hour.. but it LOOKS like I&#039;m working.

10. Junior Member
Join Date
Dec 1969
Posts
11

## RE: 35 > 24

It might be me then.. I have an example and it says for 11:59 PM use 35:89 for the code.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•