cancel
Showing results for 
Search instead for 
Did you mean: 

Working with SAP Timestamp field

Former Member
0 Kudos

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:

@mydate

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"

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

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


-Abhilash