Home Analyst Portal
Options

SQL Table Widget Date Format

Harold_HarrisHarold_Harris Customer IT Monkey ✭
I am running the query below and the date is not being formatted in ONE of my environments. I am using the exact same query in both environments.  Not sure where to look to see why it is working in one and not the other?

SELECT TOP 30000 wi.WorkItemId AS [Id], wi.Created, wi.AffectedUser, wi.Title, dsstatus.DisplayString as [Status], wi.AssignedUser, dssupport.DisplayString as [Support Group], wi.ResolvedDate
FROM WorkItem AS wi
LEFT JOIN [Enumeration] enum ON enum.EnumerationID = wi.TierId
LEFT JOIN [DisplayString] dssupport ON dssupport.ElementID=enum.EnumerationID and dssupport.LocaleID = 'ENU'
LEFT JOIN [DisplayString] dsstatus ON dsstatus.ElementID=wi.StatusId and dsstatus.LocaleID = 'ENU'
LEFT JOIN [DisplayString] dsimpact ON dsimpact.ElementID=wi.Impact and dsimpact.LocaleID = 'ENU'
LEFT JOIN [DisplayString] dsurgency ON dsurgency.ElementID=wi.urgency and dsurgency.LocaleID = 'ENU'
Where ClassId='E6C9CF6E-D7FE-1B5D-216C-C3F5D2C7670C' and wi.Created>='2018-01-01'
ORDER BY wi.Created ASC


Best Answer

Answers

  • Options
    Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Regardless of what version you have the JS will not trigger on your wi.ResolvedDate to localize it.
    Check out this post were I detail what is needed in the SQL query for the JS to trigger the data columns
  • Options
    Harold_HarrisHarold_Harris Customer IT Monkey ✭
    Brian,  in my one environment it is localizing both the Created date and the Resolved date, but I will keep your post for when I need it in the future.


    To Geoff's point they are not running the same version!  I will update tonight and see if that fixes that issue.

    Thanks
  • Options
    Geoff_RossGeoff_Ross Cireson Consultant O.G.
    I'm going to be diplomatic and say that everyone is right. I'm pretty sure @Brian_Wiest was correct in that this used to be the cased but was recently addressed with an update. Which explains what you are seeing @Harold_Harris

  • Options
    Harold_HarrisHarold_Harris Customer IT Monkey ✭
    I updated the portal and it is working now.  I should have thought of that first!

    Thanks
Sign In or Register to comment.