The call detail records (CDR) in Cisco Unified Communications Manager (Cisco Call Manager) have many fields for date and time. The date and time fields in CDR files are as follows:

To better understand each field, take a look at the following image:

As mentioned in the Cisco document, the date and time fields are based on the UTC zone, and it is the number of seconds elapsed since January 1st, midnight, 1970; 00:00:00 1/1/1970.
This is called the Unix epoch.
What is epoch time?
The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). Literally speaking, the epoch is Unix time 0 (midnight 1/1/1970), but ‘epoch’ is often used as a synonym for ‘Unix time.’ Many Unix systems store epoch dates as a signed 32-bit integer, which might cause problems on January 19, 2038 (known as the Year 2038 problem or Y2038).
| Human readable time | Seconds |
|---|---|
| 1 hour | 3600 seconds |
| 1 day | 86400 seconds |
| 1 week | 604800 seconds |
| 1 month (30.44 days) | 2629743 seconds |
| 1 year (365.24 days) | 31556926 seconds |
So, to convert date and time fields to the human-readable format, a few tweaks are required.
If you are looking for Cisco CDR date and time conversion, you have come to the right place.
In this article, you can find many ways to convert Cisco CDR date and time fields to a human-readable format or date object to be used in another software.
Convert Cisco CDR Date Time in Microsoft Excel/Google Sheet:
Use the Cisco CDR timestamp converter for one value or a pasted column. Select a named zone such as America/Los_Angeles to apply the correct offset for each date, including daylight-saving changes.
Convert Cisco CDR timestamps in Excel
Put the epoch value in cell E3. For UTC, use:
=DATE(1970,1,1)+E3/86400
Format the result as yyyy-mm-dd hh:mm:ss. Cisco CDR date/time values use seconds; if a separate source gives milliseconds, divide by 86400000 instead. Keep the original values in their own column so you can check the conversion.
For a known fixed UTC offset, place the signed number of hours in F3:
=DATE(1970,1,1)+E3/86400+F3/24
A negative offset moves the time west of UTC. Los Angeles uses −8 hours in standard time and −7 in daylight time. Adding eight hours does not produce Pacific time. A single fixed offset is not suitable for a column spanning daylight-saving changes.
If E3 is specifically dateTimeConnect, zero indicates no connection time. Preserve that meaning rather than displaying January 1, 1970:
=IF(E3=0,"Not connected / unset",DATE(1970,1,1)+E3/86400)
This does not determine whether the complete customer call was missed: related transferred or hunted legs may have connected.
Pacific time: winter and summer examples
Corrected September 20, 2026: the earlier example added eight hours for Pacific time. The examples below use the America/Los_Angeles zone and the offset applicable on each date.
| Cisco timestamp (seconds) | UTC | Los Angeles |
|---|---|---|
1768478400 | January 15, 2026, 12:00 | January 15, 2026, 04:00 (UTC−8) |
1784116800 | July 15, 2026, 12:00 | July 15, 2026, 05:00 (UTC−7) |
Try both dates in the bulk converter using Try an example. It also includes an unset connection timestamp. Time-zone conversion uses your browser’s time-zone rules; keep your browser current.
For programmatic local-time output in JavaScript, use a named time zone:
const epochSeconds = 1784116800;
const localTime = new Intl.DateTimeFormat("en-GB", {
timeZone: "America/Los_Angeles",
dateStyle: "medium",
timeStyle: "long"
}).format(new Date(epochSeconds * 1000));
Unlike a fixed offset, a named zone applies the daylight-saving rule for that timestamp. See Intl.DateTimeFormat documentation and Cisco’s CDR field definitions.
Convert Cisco CDR DateTime in Javascript:
There are times when you need to convert CDR date time format in Javascript web app or application; and for that, I wrote the following function:
function convertCiscoCDRDateTimetoUTC(CDRDateTime)
{
var dateTimeInput = new Date(CDRDateTime*1000);
return dateTimeInput.toISOString();
}It’s really that simple! We create a new Date object and return the value to ISO date-time format.
You can use that function like this:
var HumanReadableDateTime=convertCiscoCDRDateTimetoUTC(1462375534); console.log(HumanReadableDateTime);
The output is generated in the following format:
2016-05-04T15:25:34.000Z
Convert Cisco CDR Date Time in PHP:
We can convert CDR date time in two methods in PHP script; the first method uses the date function:
$epoch = 1483228800;
echo date('r', $epoch); //output as RFC 2822 date - returns local time
echo gmdate('r', $epoch); // returns GMT/UTC time: Sun, 01 Jan 2017 00:00:00 +0000$epoch = 1483228800;
$dt = new DateTime("@$epoch"); // convert UNIX timestamp to PHP DateTime
echo $dt->format('Y-m-d H:i:s'); // output = 2017-01-01 00:00:00Convert Cisco CDR Date Time in Perl:
You can use the following code in Perl for converting Cisco CDR date time to a human-readable format.
use DateTime;
$epoch=1483228800;
$dt = DateTime->from_epoch( epoch => $epoch );
$year = $dt->year;
$month = $dt->month; # 1-12 - you can also use '$dt->mon'
$day = $dt->day; # 1-31 - also 'day_of_month', 'mday'
$dow = $dt->day_of_week; # 1-7 (Monday is 1) - also 'dow', 'wday'
$hour = $dt->hour; # 0-23
$minute = $dt->minute; # 0-59 - also 'min'
$second = $dt->second; # 0-61 (leap seconds!) - also 'sec'
$doy = $dt->day_of_year; # 1-366 (leap years) - also 'doy'
$doq = $dt->day_of_quarter; # 1.. - also 'doq'
$qtr = $dt->quarter; # 1-4
$ymd = $dt->ymd; # 1974-11-30
$ymd = $dt->ymd('/'); # 1974/11/30 - also 'date'
$hms = $dt->hms; # 13:30:00
$hms = $dt->hms('|'); # 13|30|00 - also 'time'Convert Cisco CDR Date Time in Delphi:
You can use the following code in Borland Delphi for converting Cisco CDR date time to a human-readable format.
myString := DateTimeToStr(UnixToDateTime(Epoch)); Where Epoch is a signed integer.
You can use the following code in C for converting Cisco CDR date time to a human-readable format.
Example C routine using STRFTIME. STRFTIME converts information from a time structure to a string form and writes the string into the memory area pointed to by “string.”
#include
#include
int main(void)
{
time_t now;
struct tm ts;
char buf[80];
// Get current time
time(&now);
// Format time, "ddd yyyy-mm-dd hh:mm:ss zzz"
ts = *localtime(&now);
strftime(buf, sizeof(buf), "%a %Y-%m-%d %H:%M:%S %Z", &ts);
printf("%s\n", buf);
return 0;
}Convert Cisco CDR Date Time in MySQL:
In MySQL, you should use the FROM_UNIXTIME function in your SQL query.
FROM_UNIXTIME(epoch, optional output format) Default output format is YYY-MM-DD HH:MM:SS
Convert Cisco CDR Date Time in Linux Shell:
You can use the following command in the Linux shell to convert Cisco CDR date time to a human-readable format.
date -ud @1483228800 Change 1483228800 with your original CDR date-time value.
You can use the following code in PowerShell for converting Cisco CDR date time to a human-readable format.
$CDRTime= 1483228800 $origin = New-Object -Type DateTime -ArgumentList 1970, 1, 1, 0, 0, 0, 0 $whatIWant = $origin.AddSeconds($CDRTime)
Convert Cisco CDR Date Time in Microsoft SQL Server:
In SQL Server, you should use the DATEADD function in your SQL query.
DATEADD(s, epoch, '1970-01-01 00:00:00')
In SQLite, you should use the DateTime function in your SQL query.
SELECT datetime(epoch_to_convert, 'unixepoch');
or local timezone:
SELECT datetime(epoch_to_convert, 'unixepoch', 'localtime');
Convert Cisco CDR Date Time in Java:
You can use the following code in Java for converting Cisco CDR date time to a human-readable format.
String date = new java.text.SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(new java.util.Date (epoch*1000));
You can use the following code in VBScript for converting Cisco CDR date time to a human-readable format.
function epoch2date(myEpoch)
epoch2date = DateAdd("s", myEpoch, "01/01/1970 00:00:00")
end functionConvert Cisco CDR Date Time in Go:
You can use the following code in Go for converting Cisco CDR date time to a human-readable format.
package main
import(
"fmt"
"time"
)
func main(){
// Current epoch time
fmt.Printf("Current epoch time is:\t\t\t%d\n\n", currentEpochTime())
// Convert from human readable date to epoch
humanReadable := time.Now()
fmt.Printf("Human readable time is:\t\t\t%s\n", humanReadable)
fmt.Printf("Human readable to epoch time is:\t%d\n\n", humanReadableToEpoch(humanReadable))
// Convert from epoch to human readable date
epoch := currentEpochTime()
fmt.Printf("Epoch to human readable time is:\t%s\n", epochToHumanReadable(epoch))
}
func currentEpochTime() int64 {
return time.Now().Unix()
}
func humanReadableToEpoch(date time.Time) int64 {
return date.Unix()
}
func epochToHumanReadable(epoch int64) time.Time {
return time.Unix(epoch, 0)
}
You can use the following code in C# for converting Cisco CDR date time to a human-readable format.
private string epoch2string(int epoch) {
return new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(epoch).ToShortDateString(); }Convert Cisco CDR Date Time in Python:
You can use the following code in Python for converting Cisco CDR date time to a human-readable format.
import time; time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.localtime(epoch))
Replace time. Local time with time. gmtime for GMT. Or using DateTime:
import datetime; datetime.datetime.utcfromtimestamp(epoch).replace(tzinfo=datetime.timezone.utc)
Convert Cisco CDR Date Time in Ruby:
You can use the following code in Ruby for converting Cisco CDR date time to a human-readable format.
Time.at(epoch)
Finally, if you want to convert just one or two CDR dates, try Cisco CDR Date Time Conversion Online Tools. For continuous file collection and normalized reporting, review the Cisco CUCM reporting methods.
