edink79 Posted August 25, 2022 Share Posted August 25, 2022 Dear all,I have a datefield (field_2989) stored in database as unixtime. As I want to show that field in my report in dd-mm-yyyy format I use this query "select from_unixtime(field_2989, '%d-%m-%Y')". This works as expected, no problem at all.I have defined a variable which pulls data from this field, but cannot figure how to write variable expression to format the result. All I am getting is unixtime integer, but not formatted date.Anyone knows a solution to this?Thanking in advance. Link to comment Share on other sites More sharing options...
jgust Posted August 25, 2022 Share Posted August 25, 2022 What is the classtype for this "from_unixtime(field_2989, '%d-%m-%Y')" field, and can you provide a screenshot of what is being returned? Link to comment Share on other sites More sharing options...
luked Posted August 25, 2022 Share Posted August 25, 2022 You could try adding this into a text field -new SimpleDateFormat("dd-MM-yyyy HH:mm").format($V{Your Variable}) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now