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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting timestamp to a number in SQL

Hi

I created a standard incremental loader based on the Date field. I'm having difficulties changing the data format of my date field to a number. Date format in SQL database: 2015-02-04 00:00:00:.0000000', I want to replace this with a number format, i.e. 42040, within the SQL part of the load script (I need this in my where clause). Any ideas how this can be achieved?

Thanks

Labels (1)
11 Replies
MK_QSL
MVP
MVP

cast(mycol as varchar2(30))

anbu1984
Master III
Master III

If you have to_date() in your database, then try this to convert character string to date

to_date(Substr('2015-02-04 00:00:00:.0000000',1,19),'YYYY-DD-MM HH24:MI:SS')