Datase: H2
Table contains a Timestamp(10,10) column
Opening up a VA workbook from a query result set sets the data type for this column to a String (first issue).
Second issue, attempting to convert it from the String to a Date + Time by choosing Change Data Type -> Data and time doesn't seem to work (second issue). Viewing the data before the conversion it's something like "2015-03-02 12:13:34.0". After the conversion it then shows up as "null". Maybe it should complain about rows it wasn't able to convert so you at least know it failed (third issue)?
Changing the Date Format under "Default Properties -> Date Format to Custom with "yyyy-MM-dd HH:mm:ss'.0'" or "yyyy-MM-dd HH:mm:ss.0" neither seem to work-- both end up as null-- but I suspect this is for display of the date, not conversion, correct?
78 KB
I also tried converting the column type to Date but no go there either. The date format is "yyyy-MM-dd".
I also noticed that Data Studio is showing the column type as TImestamp(10,10) in the schema browser but if you describe the table H2 reports it as Timestamp(23). Likely not the problem but thought I would mention it anyway.
And if you can at least time me, in the meantime, what the format the date as a string needs to be in to be converted correctly I can at least format it in my sql query for now so I can get some date filters working in a VA worksheet.
And if you can at least time me, in the meantime, what the format the date as a string needs to be in to be converted correctly I can at least format it in my sql query for now so I can get some date filters working in a VA worksheet.
We perform data conversion when changing the data type of a Number field to Date or Date/Time, where the numeric value is treated as the number of days from 1/1/1970. However, when changing the data type of a String field to Date or Date/Time, we do not perform any conversion and, as you have noted, it always returns null. This is currently as designed. We'll investigate enhancing the conversion logic.
We are currently investigating the first issue to determine why a Timestamp column is treated as a String field in VA. Do you use a JDBC Driver to access the H2 database?
We perform data conversion when changing the data type of a Number field to Date or Date/Time, where the numeric value is treated as the number of days from 1/1/1970. However, when changing the data type of a String field to Date or Date/Time, we do not perform any conversion and, as you have noted, it always returns null. This is currently as designed. We'll investigate enhancing the conversion logic.
We are currently investigating the first issue to determine why a Timestamp column is treated as a String field in VA. Do you use a JDBC Driver to access the H2 database?
We are currently investigating the first issue to determine why a Timestamp column is treated as a String field in VA. Do you use a JDBC Driver to access the H2 database?
We've identified the root cause & should have a fix out by tomorrow.
We are currently investigating the first issue to determine why a Timestamp column is treated as a String field in VA. Do you use a JDBC Driver to access the H2 database?
We've identified the root cause & should have a fix out by tomorrow.
Now that was speedy! And eliminates the need for String to Date & Date/Time (for right now that is ;)
Thanks!
Now that was speedy! And eliminates the need for String to Date & Date/Time (for right now that is ;)
Thanks!
Patch is ready.
Download: http://www.aquafold.com/download/v16.0.0/ads-16.0.3-4-patch.zip
Update Instructions: http://www.aquafold.com/support-update.html#v16
Patch is ready.
Download: http://www.aquafold.com/download/v16.0.0/ads-16.0.3-4-patch.zip
Update Instructions: http://www.aquafold.com/support-update.html#v16
Confirmed it now comes in as a Date/Time (or Date as appropriate). Thanks!
Confirmed it now comes in as a Date/Time (or Date as appropriate). Thanks!
Can we either re-open this ticket (or likely better yet I can open a new ticket) regarding the conversion of String to Date & Date/Time? I'm running into more and more cases where I'm dealing with String data that is really a date such YYYY/MM/DD. Being able to convert it in VA from String to a Date or Date/Time would be very helpful :)
Can we either re-open this ticket (or likely better yet I can open a new ticket) regarding the conversion of String to Date & Date/Time? I'm running into more and more cases where I'm dealing with String data that is really a date such YYYY/MM/DD. Being able to convert it in VA from String to a Date or Date/Time would be very helpful :)
@JasonK: pls do open a new request for conversion of String to Date & Date/Time.
@JasonK: pls do open a new request for conversion of String to Date & Date/Time.
Issue #13207 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 16.0.3-4 |
No time estimate |
I also tried converting the column type to Date but no go there either. The date format is "yyyy-MM-dd".
I also noticed that Data Studio is showing the column type as TImestamp(10,10) in the schema browser but if you describe the table H2 reports it as Timestamp(23). Likely not the problem but thought I would mention it anyway.