How to create report on monthly or yearly (time_card table) in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2025 11:58 PM
I am aiming to generate a report in ServiceNow that presents data on a monthly or yearly basis for the past 12 months. However, when utilizing the timecard table, the information is currently limited to a weekly format only.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2025 12:30 AM
Hi @samanthredd ,
Under the reporting feature, if you don’t have a month field, you can create a calculated field or use start date and format it.
Or else you can also create a database view with a calculated column in the view to extract the month and year from the week starts date. Then create a report on this database view grouped by month.
Please accept this solution and mark this as helpful if you find it useful.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2025 12:41 AM
Yeah, the timecard table in ServiceNow is structured weekly by default, so if you're trying to create a monthly or yearly report, you won’t get that directly out of the box. But there’s a workaround.
What you can do is pull the timecard records for the last 12 months and then group them by month or year using a script. Here’s a quick example you can run in a background script to get total hours per month:
var monthlyHours = {};
var gr = new GlideRecord('time_card');
gr.addEncodedQuery('start_dateONLast 12 months@javascript:gs.beginningOfLast12Months()@javascript:gs.endOfThisMonth()');
gr.query();
while (gr.next()) {
var start = new GlideDateTime(gr.getValue('start_date'));
var year = start.getYearLocalTime();
var month = (start.getMonthLocalTime() + 1).toString().padStart(2, '0'); // Month is zero-based
var key = year + '-' + month;
if (!monthlyHours[key]) {
monthlyHours[key] = 0;
}
monthlyHours[key] += parseFloat(gr.getValue('hours'));
}
for (var m in monthlyHours) {
gs.print(m + " → " + monthlyHours[m] + " hrs");
}
This will print something like:
2024-07 → 162 hrs
2024-08 → 145 hrs
...
2025-06 → 120 hrs
If you want to show this in a report or dashboard, you might need to either:
Store this data in a custom table via scheduled job, then report on it.
Or use Performance Analytics if your instance has it — that makes monthly trend reports easier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2025 01:16 AM
Hi @samanthredd ,
Here is a step by step process to create your reports
Project hours per month
Data stage:
Type Stage:
Choose column chart in Time Series section
Configure :
Style stage:
Also filter with state processed to only look at processed time cards
Run the report and it will look something like below
If this information proves useful, kindly mark it as helpful or accepted solution.
Thanks,
BK