Export Date Type to openOffice / libreOffice Delphi

2

How can I export a Date type to openoffice / libreoffice when I need to export a String type I do it as follows.

 SheetOpenOffice.GetCellByPosition(vCont,vlinha).SetString(Q_Assoc.Fields[i].AsString);

How can I do when the type that comes in the query is a Date type?

    
asked by anonymous 18.04.2017 / 20:04

1 answer

2

Try to do this:

if ((DateToStr(Q_Assoc.Fields[i].Value) <> Null) and (DateToStr(Q_Assoc.Fields[i].Value) <> '')) then
    SheetOpenOffice.GetCellByPosition(vCont,vlinha).SetString(Q_Assoc.Fields[i].Value);
    
18.04.2017 / 20:36