Skip to content

How to: Extract date using get #377

@cstrickland-pag

Description

@cstrickland-pag

Hi,

I am hoping to extract a date variable from row, using something along the lines of:

let value: Option<f64> = row.get::<f64, _>(field_name_str);

When trying different options I get:

= help: the following other types implement trait `FromSql<'a>`:
          &'a XmlData
          &'a [u8]
          &'a str
          bool
          f32
          f64
          i16
          i32
        and 4 others

note: required by a bound in tiberius::Row::get

How do I extract the date from the row?

Thanks in advance,

Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions