code: public Date makeDateFrom( Object obj )
    {
      if( obj == null )
      {
        return null;
      }
  
      if( obj instanceof IDimension )
      {
        obj = ((IDimension)obj).toNumber();
      }
  
      if( obj instanceof Date )
      {
        return (Date)obj;
      }
  
      if( obj instanceof Number )
      {
        return new Date( ((Number)obj).longValue() );
      }
  
      if( obj instanceof Calendar)
      {
        return ((Calendar)obj).getTime();
      }
  
      if( !(obj instanceof String) )
      {
        obj = obj.toString();
      }
  
      try
      {
        return parseDateTime( (String)obj );
      }
      catch( Exception e )
      {
        //e.printStackTrace();
      }
  
      return null;
    }
docs: Returns a new Date instance representing the object.