cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Translate the entire conversation x

How to ensure a DateTime or Timestamp type is returned

mariaSutton
12-Amethyst

How to ensure a DateTime or Timestamp type is returned

Hi, 

I am using the Decode Datebase Function to return a datetime when a task has a status of "Completed". 
It looks like this:

mariaSutton_0-1707250651543.png

 

However, when I use the above approach the return type is string and not a timestamp.

The reason I want a timestamp for this value is so the user can set the criteria/param before generating the report easily by selecting a date from the calendar picker (like in the image below) instead of entering free text. 

mariaSutton_1-1707251304879.png

 

 

2 REPLIES 2
HelesicPetr
22-Sapphire II
(To:mariaSutton)

Hi @mariaSutton 

If you use Datebase Function the return value is always string,

You would need to retype the output as you has asked, but I am not sure you can do that in the Reporting Management (QueryBuilder).

PetrH

Why do you need to use the database function? Can't you get the timestamp directly from a "Reportable Item"?

Announcements
Top Tags