Subject | Re: [IBO] EXTRACT YEAR FROM A DATE FIELD IN COMPUTED FIELDS. |
---|---|
Author | Kevin Everhart |
Post date | 2001-01-15T19:14:37Z |
Tony,
Try something like this:
var
Present: TDateTime;
Year, Month, Day: Word;
begin
Present:= Try_Date;
DecodeDate(Present, Year, Month, Day);
MyDate.Text := Counter + '/' + IntToStr(Year);
end;
Tony wrote:
Try something like this:
var
Present: TDateTime;
Year, Month, Day: Word;
begin
Present:= Try_Date;
DecodeDate(Present, Year, Month, Day);
MyDate.Text := Counter + '/' + IntToStr(Year);
end;
Tony wrote:
> Hi All.
>
> There is a way to extract only Year from a field?
> This should be performed in a computed fields.
>
> EG
> the computed field 'd show : 1/2001
>
> so let's say:
> I have a field named COUNTER and another named TRY_DATE:
> The computed field is made by:
>
> COUNTER || '/' || CAST( TRY_DATE AS VARCHAR( 10 ))
>
> but show me : 1/2001-01-15.
> I wanna only: 1/2001.
>
> TIA
> Tony