[B1 Dashboard] Working with Time in B1 Dashboard

  • Updated

Scenario: You would like to display an SAP Time field in the B1 Dashboard.

Setup: SAP stores "Time" as an integer type instead of a datetime/time column in the database. To use the field in a B1 Dashboard layout you will first need to convert it to a datetime.

Example:
UDF field on the Sales order document:

SQL to show the DocEntry, CardCode and Time in a dashboard:

SELECT DocEntry, CardCode,
CONVERT(DATETIME, STUFF(RIGHT('0000' + CONVERT( VARCHAR(5), U_TIME), 4), 3, 0, ':')) AS 'Time'
FROM ORDR

As you can see in the SQL the UDF field value is converted into a datetime.
When doing this the dashboard editor will recognize the field as a datetime field.
You can now format the field to only show the time:

And the time will now be shown with the correct format in the dashboard.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.