Thanks a lot for quick respond.
I would like to have the format as : 00:15:C5:F1:1D:45 
Please help me how to convert this number 224577687400448 to 
this format 00:15:C5:F1:1D:45 
Once again thanks a ton,
JP



----- Original Message ----
From: Dennis Cote <[EMAIL PROTECTED]>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Friday, September 12, 2008 9:22:15 AM
Subject: Re: [sqlite] Convert the MAC address from integer to characters.

Joanne Pham wrote:
> I have this MAC Address as integer 224577687400448. Is there any
> buildin function in SQLite to convert this MAC Address from integer
> to character format (IP Address format) as
> <number>.<number>.<number>.<number>

No, there is not, but you can do it using a simple (well maybe not so 
simple) expression using bit manipulation and concatenation.

Note, you say you have a MAC address (i.e. 48 bits) which are usually 
displayed as a set of 6 hex bytes (i.e. XX-XX-XX-XX-XX-XX) not in the 
dotted quad format used for IP addresses (which are only 32 bits in 
IPv4). Which do you really have, and what format do you really want to 
use to display it?

Dennis Cote
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



      
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to