Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect ISARIC hosttim conversion #986

Open
rebkwok opened this issue Oct 20, 2023 · 0 comments
Open

Incorrect ISARIC hosttim conversion #986

rebkwok opened this issue Oct 20, 2023 · 0 comments

Comments

@rebkwok
Copy link
Contributor

rebkwok commented Oct 20, 2023

The hosttim field on the ISARIC table is converted to a date


cast = f"CONVERT(DATE, {returning}, 103)"

However, it's actually a time (string), not a date. Converting it to date doesn't error, but it produces "1900-01-01" for all values.

Example query on db:

SELECT TOP 3 
    hosttim,
    CONVERT(DATE, hosttim, 103) as date,
    CONVERT(TIME, hostim) as time
FROM ISARIC_Patient_Data_TopLine;
hosttim date time
12:39:00 1900-01-01 12:39:00.0000000
11:17:00 1900-01-01 11:17:00.0000000
19:10:00 1900-01-01 19:10:00.0000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant