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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

time stamp issue

hi all

i am importing raw data from MS Access and Date column in MS Access has date followed by time stamp

5/16/2013 12:00:00:00

when i load the raw data and i compare the date column with variable declared in script

tdate= date (today(),'M/D/YYYY');

load * from MS access table where Date='$(tdate);

this gives an error of mismatch format

please advise for to resolve in script

thanks

Labels (1)
12 Replies
sushil353
Master II
Master II

try:

Now() instead of today()

HTH

Sushil

Not applicable
Author

how will that help...

i need a formula to us on Date column in MS Access  while loading it in Qlikview script to remove time stamp

any idea

Not applicable
Author

write according to this syntax

tab1:

load *,date(Date,'M/D/YYYY') as Date_new

from MS access table ;

load * resident tab1  where Date_new=$(tdate);

Not applicable
Author

You can try -  MakeDate(Year(Date),month(Date),Day(Date))

while loading the access data on qlikview... this will remove the time from time stamp

hope it helps...

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Try this one

Let tdate= Date(today(),'M/D/YYYY');

Ex: load * from MS access table where floor(Date(Date,'M/D/YYYY'))=$(tdate);

Not applicable
Author

none of the above 3 suggestions are working as its MS Access so its Select instead of Load and the error i am getting for all teh 3 options is type mismatch in SQL query

please advise

sivarajs
Specialist II
Specialist II

Use let statement to define your date and use in load like

load * from test where Date='$(tdate)';

Not applicable
Author

hi Siv

as mentioned in my original post, i hav already declared the variable and your suggestion doesnot work

thanks

Not applicable
Author

You can use-

//first load table from access...

Temp:

select Date,

Data1,

Data2

from AccessTableName;

// Use load statement...

Final Table:

load

Date,

MakeDate(Year(Date),month(Date),Day(Date)) as Final Date,

Data1,

Data2

resident Temp;

Drop Table Temp;

Hope it will resolve the issue.