Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
DataSync_Master
Contributor
Contributor

How to Cast datetime(7) Field to datetime(3)

I'm encountering an issue with a datetime column that includes extra milliseconds. I tried setting up a global rule transformation in Attunity to convert datetime(7) to datetime(3), but it didn't work. For example, converting "2020-10-23 17:12:44.0000000" to "2020-10-23 17:12:44.000" didn't apply as expected. I also tried configuring Qlik inline transformation in the table settings with datetime("YYYY-MM-DD HH:MM:SS.SSS"), but this resulted in null values across the field. Could you please advise on how to achieve the correct formatting?

Thank you!

Labels (1)
2 Solutions

Accepted Solutions
john_wang
Support
Support

Hello @DataSync_Master ,

BTW, you may change the output data type to DATETIME(3) in transformation to see if it helps.

The screen sample:

john_wang_0-1730167392501.png

Thanks,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

DataSync_Master
Contributor
Contributor
Author

Hi,
Thank you for your prompt response. My source is SQL Server and my target endpoint is GCS bucket.

View solution in original post

4 Replies
john_wang
Support
Support

Hello @DataSync_Master ,

Welcome to Qlik Community forum and thanks for reaching out here!

Would you please share what's the source and target endpoints types? I'd like to confirm the behavior for you.

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
john_wang
Support
Support

Hello @DataSync_Master ,

BTW, you may change the output data type to DATETIME(3) in transformation to see if it helps.

The screen sample:

john_wang_0-1730167392501.png

Thanks,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
DataSync_Master
Contributor
Contributor
Author

Hi,
Thank you for your prompt response. My source is SQL Server and my target endpoint is GCS bucket.

john_wang
Support
Support

Thank you so much for your update @DataSync_Master , feel free to let us know if you need any additional assistance.

Best Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!