cancel
Showing results for 
Search instead for 
Did you mean: 

Find the last "Sent:" date/time in the list

Former Member
0 Kudos

Is it possible to find the last "Sent:" date/time in the list without including the details after the AM/PM of that date/time.

An example of the message string is attached.

Thanks for any help,

Jen

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Jen,

What portion of the text towards the end would you like the report to display?

-Abhilash

Former Member
0 Kudos

Hi Abhilash.

Only the last listed Date/Time.

Former Member
0 Kudos

I suppose, to be more specific, the last date listed that has "Sent:" before the date.

abhilash_kumar
Active Contributor
0 Kudos

Please let me know if this works:

stringvar s := {string_field};

stringvar array ns := split(s, 'Sent: ');

Left(ns[ubound(ns)],9);

-Abhilash

Former Member
0 Kudos

That seemed to work until I went to page 2.  I believe this is error is due to the date diff.  Is there  a way to turn the formula you sent me into a date/time field?   

abhilash_kumar
Active Contributor
0 Kudos

Sure, try:

stringvar s := {string_field};

stringvar array ns := split(s, 'Sent: ');

If isDate(Left(ns[ubound(ns)],9)) then

cDate(Left(ns[ubound(ns)],9)) else cDate(0,0,0);


-Abhilash