Get Custom datetime

Hello dears, Is there any way to get the datetime that meets my criteria?

for example :

if( Buy)
AddColumn( Date, "Datetime" , format = 1.4 );

You cannot use "if" to chek an array variable , also if you want date of buy you probably want something like this

AddColumn( DateTime(), "Date / Time", formatDateTime );
Filter = Buy;