try {
Long longValue = Long.parseLong(value);
return new JodaDateTime(longValue);
} catch (NumberFormatException e) {
// Guess it wasn't a long value ...
throw new ValueFormatException(value, getPropertyType(),
GraphI18n.errorConvertingType.text(String.class.getSimpleName(),
DateTime.class.getSimpleName(),
value), err);
}
}