Mysql db query to get sprint start and end date in readable format currently they are in bigint

Currently Sprint start date and end dates having datatype of big int , Is there any way to convert those into date format in jira mysql database

2 answers

0 votes
Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2021

Nic is correct in that one shouldn't do too much direct database querying, but there are occasional times where it's useful.

In this case, the date is stored as a Unix timestamp in milliseconds, so use the from_unixtime() function and divide by 1000 (to get seconds), e.g.

from_unixtime(end_date/1000)

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2021

Another reason for not trying to read the database for Jira reporting, it is simply not built for it.

Anyway, you'll need to use whatever it is your SQL server uses to convert dates into a human format.

Suggest an answer

Log in or Sign up to answer