Bem vindo ao meu blog, faça comentários ao meu código para tentarmos chegar a uma boa solução

quinta-feira, 19 de julho de 2007

Último dia do Mês (novas formas)

Uma forma:
  • Global datetimevar firstDate:= datetime(year(CurrentDateTime), month(CurrentDateTime),1,0,0,0) ;
  • Global datetimevar lastMonth:= dateadd("m",+0,firstDate); lastMonth:=dateadd("d",-1, lastMonth);

Outra forma:

If {table.date} in LastFullMonth Then
{table.date}
Else
0
Its Returns the Value if the date falls on any date from the previous month.
if today is 19/07/2007 its returns 31/07/2007

Sem comentários: