Jump to content


Photo

Leaving Date-Cell empty


  • Please log in to reply
1 reply to this topic

#1 Frank

Frank
  • Members
  • 30 posts

Posted 02 April 2018 - 03:46 PM

Hello,

 

in my database were some Fields of type DATE, which are null.

 

I tried

 

              if (not FieldbyName('DTSTART').IsNull) then
                begin
                 nextgrid61.CellBy['colProjectStart', iRowCnt].AsDateTime := FieldbyName('DTSTART').AsDateTime;
                end;
 

if the Field is null, so the cell will not be filled, but in this case, the cell is always filled with "30.12.1899".

 

How can i prevent this and leave the cells empty?

 

Best regards

 

Frank



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 02 April 2018 - 03:57 PM

Hi,

Maybe you can set Empty property of Cell to True?

Then you can set EmptyText property of column to for example NULL
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users