Reporting on Time from Application tables

SamuelGorgonio
New Contributor II

I noticed that the application tables have an odd time format in column called timeid

SamuelGorgonio_0-1682436232833.png

 

is there another table that houses the times in 2023M3 format or is there a way to convert this column easily when using it in a SQL data adaptor?

1 ACCEPTED SOLUTION

You must use a data table edit method to get the correct time. Use SQL to get the datatable, then do something like

datatable.Columns.Add("TimeName")
datatable.Columns("TimeName").ReadOnly = False
datatable.Columns("TimeName").MaxLength = -1

For each dr as DataRow in datatable.rows
dr.BeginEdit
dr("TimeName") = TimeDimHelper.GetNameFromId(dr("TimeId")
dr.EndEdit
Next

 that should get you what you are looking for.

View solution in original post

1 REPLY 1

You must use a data table edit method to get the correct time. Use SQL to get the datatable, then do something like

datatable.Columns.Add("TimeName")
datatable.Columns("TimeName").ReadOnly = False
datatable.Columns("TimeName").MaxLength = -1

For each dr as DataRow in datatable.rows
dr.BeginEdit
dr("TimeName") = TimeDimHelper.GetNameFromId(dr("TimeId")
dr.EndEdit
Next

 that should get you what you are looking for.