Closed sanzoghenzo closed 8 months ago
There is an example in the docs https://docs.rs/dbase/0.5.0/dbase/#examples
You have to match the enum and do things with it
If you know in advance the type of the field value, you can use try_from
dbase::Date::try_from(value).unwrap()
If you know in advance the type of the field value, you can use
try_from
dbase::Date::try_from(value).unwrap()
This is what I was looking for! Like I said, I'm really a rust newbie, and I was looking for something like .to_int
or .to_value
... I really need to read at least the Rust by example guide! :sweat_smile:
Thanks for the help!
Hi, thanks for your work on this project.
I'm new to rust, and just started to piece together a program to read dbf files created by another app and send new data to a server.
I'm struggling to understand how can I get a field value for comparisons other than equality.
My use case is to filter out all the rows that have the "SEC_1970" field (that contains the unix timestamp) older than the given one.
Here's what I've done so far:
This obviously errors out because
binary operation "<" cannot be applied to type FieldValue
I've gone through the documentation but I couldn't find any method that could help me (to my knowledge, at least).
Am I missing something, or approaching this in a completely wrong way?
Thanks for the attention