Simplicty and flexibility!


Function::String

LastC
LastC(TEXT VALUE,n)
LastC("My string",3)
LastC(TextField1,Length)


The lastc function extracts a specified number of characters from the end (right) of a text value.

lastc(FIELDNAME, 1) returns the last character in the field. Trailing spaces are ignored. If there are n or fewer characters in the field, lastc returns the original text value.

Parameters


TEXT VALUE

A string/text that we want to copy part of from the end.

Number. The length of the piece we want to cut of

Returns/Result


A text value n characters in length.

Examples


Examples


lastc( "DataEase" , 4)

Returns: Ease


lastc( "Club ParaDEASE" , 4)

Returns: EASE


lastc( FIRST NAME, 4)

Returns:The last four characters in the FIRST NAME field for every record that is processed. If the FIRST NAME field contains the value Roger, the function returns oger.


Reference

lastc

Type

Text Function

Purpose

The lastc function extracts a specified number of characters from the end (right) of a text value.

Syntax

lastc( TEXT VALUE, n)

Returns

A text value n characters in length.

Usage

lastc(FIELDNAME, 1) returns the last character in the field. Trailing spaces are ignored. If there are n or fewer characters in the field, lastc returns the original text value.

Examples

lastc( "DataEase" , 4)

Returns: Ease

 

lastc( "Club ParaDEASE" , 4)

Returns: EASE

 

lastc( FIRST NAME, 4)

Returns:The last four characters in the FIRST NAME field for every record that is processed. If the FIRST NAME field contains the value Roger, the function returns oger.

See Also


FirstW
FirstC >
LastW
MidC
MidW
TextPos

On the forum about LastC

StringReplace(), CHR(), LastC() and ConCat() used to reformat number to export number

Download Sample This is quite straightforward but as it again showcase some of our new functions we'll happy to showcase it. We simply added th...

Product: Dataease [{8}]FIVE. Written by DataEase 28/02/15 at 15:00:40

On the blog about LastC


dg3_HelpView