Skip to main content

Error viewing calendar: String was not recognised as a valid TimeSpan

Error when viewing calendar: String was not recognised as a valid TimeSpan

Written by Harry Ledger

This error occurs when trying to open the Individual or Team Calendar. It is often caused by an absence record (or multiple records) not having a start time and/or end time against them.

To identify the erroneous records, follow the steps below.

  1. In the Admin Tool, click Import/export data.

  2. Click Create an export definition.

  3. Click Select the data to export.

  4. From the Database drop-down menu, select Select HR.

  5. Click the SQL tab then delete Select*.

  6. Copy the following SQL data into the blank space:

Select 
Person.Snapshot.[Informal Name],
Person.Snapshot.[Effective Status],
Absence.History.[Created Date],
Absence.History.[Absence Start Date],
Absence.History.[Start Time],
Absence.History.[Absence End Date],
Absence.History.[End Time],
Absence.History.[Total Days],
Absence.History.[Total Hours],
Absence.History.[Absence Type],
Absence.History.Workflow
From
Absence.History
Inner Join Person.Snapshot On Person.Snapshot.[Person Number] = Absence.History.[Person Number]
Where
(
Absence.History.[Start Time] Is Null
)
Or (
Absence.History.[End Time] Is Null
)
Did this answer your question?