Skip to Content
avatar image
Former Member

Working with SAP Timestamp field

I am having a hard time working with the Timestamp field in Crystal Reports.  The field is formatted as a number and looks like 20,151,021,123,019.10.

The ultimate goal of my report is to open the report, refresh the data with the date being "Today - 1".  In order to do that I need to use the Timestamp field in the table.  I have been able to work with the field so that I can input "10212015" but I want it to do it automatically.  I want to be able to schedule this in BO and run based on the "Today - 1" forumula.

Any help would be greatly appreciated.

This is what is working right now:


stringvar date1;

stringvar date2;

stringvar yr;

stringvar mn;

stringvar dy;

date1:= totext({_COCKPIT_TMSG.CR_TIMESTAMP},0,"");

yr:= left(date1,4);

mn:= mid(date1,5,2);

dy:= mid(date1,7,2);

date2:= (mn&dy&yr)

Selection:  @myDate = "10212015"

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 23, 2015 at 05:23 AM

    Hi Kelvin,

    Try using a Record Selection formula that looks like:

    Cdate(Picture(Left(totext({_COCKPIT_TMSG.CR_TIMESTAMP},'#'),8), 'xxxx/xx/xx')) = CurrentDate-1


    Add comment
    10|10000 characters needed characters exceeded