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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
EasyThomas
Partner - Contributor II
Partner - Contributor II

Conversion numeric to date with Replicate

Hi,

I try to build a replicate task with db2i as a a source and SQLServer as a target.

I try to convert a numeric colum from my source in a date column on my target

The coulmn from my source looks like that '20210615'

The implicite conversion didn't work and there is no function for conversion

Any idea ?

 

Regards,

 

 

Labels (1)
1 Solution

Accepted Solutions
EasyThomas
Partner - Contributor II
Partner - Contributor II
Author

Hi,

I post the answer if anybody need it in the future

Ther is no date format in SQLite so i used the implicit conversion with the good format for SQL Server

substr('20210615',1,4)||'-'||substr('20210615',5,2)||'-'||substr('20210615',7)

View solution in original post

5 Replies
sunny_talwar

Try this

=Date(Date#('20210615', 'YYYYMMDD'))
EasyThomas
Partner - Contributor II
Partner - Contributor II
Author

Hi,

I post the answer if anybody need it in the future

Ther is no date format in SQLite so i used the implicit conversion with the good format for SQL Server

substr('20210615',1,4)||'-'||substr('20210615',5,2)||'-'||substr('20210615',7)

suvbin
Creator III
Creator III

with out using Substring how to do it.

john_wang
Support
Support

Hello @suvbin ,

May we know more information to understand the request well?

1- source/target sides database type

2- source/target sides column type

3- a sample of the data in source and what's expected results in target

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!
Steve_Nguyen
Support
Support

try this article :

https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translat...

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