LogParser User : juasebsto:Quote: Hey.. i dont tknow if this is what u need, but it works for me: WHERE date >= TIMESTAMP( '2006-09-28 00:00:00', 'yyyy-MM-dd hh:mm:ss' ) AND date <= TIMESTAMP( '2006-10-28 00:0...
Hi there,
Thanks very much for your answers. You may be think I'm crazy but I resolved it with the following script:
TO_TIMESTAMP(TO_STRING(STRCAT(STRCAT(STRCAT(STRCAT(SUBSTR(Date,0,4),'-'),REPLACE_CHR(SUBSTR(Date,5,2),'-','')),'-'),REPLACE_CHR(SUBSTR(Date,7,ADD(STRLEN(Date),-7)),'-',''))),'yyyy-M-d') > TIMESTAMP('"
+ DateLastItem + "','yyyy-M-d') OR
( (TO_TIMESTAMP(TO_STRING(STRCAT(STRCAT(STRCAT(STRCAT(SUBSTR(Date,0,4),'-'),REPLACE_CHR(SUBSTR(Date,5,2),'-','')),'-'),REPLACE_CHR(SUBSTR(Date,7,ADD(STRLEN(Date),-7)),'-',''))),'yyyy-M-d') = TIMESTAMP('" + DateLastItem + "','yyyy-M-d'))
AND
(TO_TIMESTAMP(REPLACE_STR(REPLACE_CHR(Time,' ',''),'GMT',''),'h:m:s') >= TIMESTAMP('" + TimeLastItem + "','h:m:s')) ))
I tested it with many log files and it does what I need. I found out after a while that there are some little problems when dates come with the format yyyy-M-d even if you convert them with the CONVERT function to yyyy-MM-dd.
I hope it can be useful for someone.
juan!