- Product: Voyager
- Relevant for Installation Type: Multi-Tenant Direct, Dedicated-Direct, Local, TotalCare
Help with using the date fields in Voyager Prepackaged Access Reports
Most of the date fields in Voyager contain both a date and a time. When you use Microsoft Access to query the Voyager tables, it normally gives you the date and time combined.
But sometimes you may want just a part of the date/time. There may be queries for which you want just the date, or just the year, or just the time, or the day of the week. There may be queries for which you want intervals of time, such as everything done in the last 30 days. There are a variety of techniques and functions (for example the "DateValue()" function, which strips out the time element) that you might use to work with date fields.
Here are some examples of date fields in Voyager that have only a date:
Here are some examples of date fields in Voyager that normally1 hold a date and time:
Most of the dates in the Voyager database actually have both the date and time recorded. The following example query shows how you might pull out each part of the date into its own column:
SELECT TOP 5
DateValue([discharge_date]) AS datevalue,
Month([discharge_date]) AS [month],
Day([discharge_date]) AS [day],
Year([discharge_date]) AS [year]
Design View and table of results from the example query shown above:
Constructing custom SQL queries by request and troubleshooting unexpected results from customer-created SQL queries falls outside the scope of Support. The above has been posted for informational purposes. Voyager-L and Developer Network are useful resources for finding helpful custom SQL or obtaining assistance from peers in troubleshooting custom queries.
1Exceptions may occur due to the data migrated from your previous system into Voyager.
- Article last edited: 18-Jan-2021