[SNMP4J] cannot print out date properly

Matthieu Casanova chocolat.mou at gmail.com
Fri Sep 2 08:58:22 CEST 2005


2005/9/2, Sam Chen <csam2ca at yahoo.com>:
> 
> Hi,
> When I tried to get the software table and tried to
> print out the result for
> installed_date(1.3.6.1.2.1.25.6.3.1.5) by using the
> following code:
> 
> ////////////////////////////////////////////
> VariableBinding[] variables = tableEvent.getColumns();
> String value = variables[3].getVariable().toString();
> system.out.println(value);
> /////////////////////////////////
> and it prints out the value like
> 07:d5:07:15:17:08:20:00
> 
> I was expecting values like a date format of string.
> How can I convert that to a string that is in the date
> format?


Are you sure that it is the good variable index ?
Because this looks like a MAC address isn't it ?

Matthieu



More information about the SNMP4J mailing list