Overview
This document provides instructions for hiding the time component in date fields within the Geobank application’s Data View. It explains the implications of changing the data type in the database and the recommended approach to achieve the desired result.
Background
When users/geologists have a request to display the specific date field without the time component:
Some DBA admins start with what seems like an obvious decision – updating the datatype in the backend (SQL Server) from either “smalldatetime” or “datetime” to “date”.
That sounds logical in terms of data storage. However, the Geobank application may cause some unexpected issues.
Several data types in SQL Server are designed to store dates. In addition to their “natural” differences defined and recognised by the SQL Server engine, Geobank treats them differently in its own additional way.
If the field’s data type has been changed to the SQL date data type “Date”, then this date column will, from now on, display in Gebank’s Data View as an ordinary text string. There is no way to set it in the Data View configuration to present such a column with a standard pop-up calendar.
Solution
If we don’t need the time portion for the date-specific columns and want to remove it from being visible, we should use a different approach to this task.
To fulfil the request for the “timeless” field version, Geobank only needs to make a minor change to its Data View configuration.
-
Verify Data Type: Ensure the Date_Completed field is set to the "smalldatetime" or "datetime" data type.
-
Access Configuration: Navigate to the Configuration Tab within Geobank.
-
Select Dataset: Identify and select the dataset containing the column to be modified.
-
Column Properties: Right-click on the dataset and choose Column Properties.
-
Editor Controls: In the properties window, select the date column to be updated and switch to the Editor Controls tab.
-
Adjust Control Type: Within the Editor Control Type dropdown, change the selection from Date and time to Date only.
-
Validate Changes: Execute the data view to confirm that the time component is no longer displayed.
Notes
- Changing the data type in the SQL Server database from “smalldatetime” or “datetime” to “date” is not recommended, as it may cause unexpected issues within the Geobank application.
- The Geobank application treats different date data types differently. Changing the data type may result in the date column being displayed as a regular text string without the ability to use a pop-up calendar.
- By modifying the “Editor Control Type” in the Geobank application’s configuration, you can achieve the desired result of hiding the time component without altering the underlying data type in the database.
Want to learn more?
Online Help Manuals - Click here for the latest version
Learning Management System - Click here to login or here to request access
Comments
0 comments
Please sign in to leave a comment.