purplesky
04-15-2013, 08:14 PM
Hi, everyone
strSQL = "SELECT A,B,C " & _
"WHERE(A)LIKE'" & a & "%'" & _
"AND (C.TIME_STAMP)BETWEEN to_date('" & b & "','dd/mm/yyyy hh:MI:ss') AND to_date('" & b1 & "','dd/mm/yyyy hh:MI:ss')+1 " & _
"GROUP BY A,B,C "
I have such SQL statements in my excel vba. I succeed to retrieve the data and show the date. Bt it suppose to show date with time like 16/4/2013 7:05:34, bt it shows only 16/4/2013. When double click on the cell, then it will show the time and the above tab also will show include time when you double click.
How to I show it straight away on the cell without I double click it?
2. I have searched on google that "Transform and Pivot" are only use in Ms Access, it wouldn't work with Ms Excel. So instead of using that, which way can I use to retrieve data according to few columns?
Thanks everyone.
strSQL = "SELECT A,B,C " & _
"WHERE(A)LIKE'" & a & "%'" & _
"AND (C.TIME_STAMP)BETWEEN to_date('" & b & "','dd/mm/yyyy hh:MI:ss') AND to_date('" & b1 & "','dd/mm/yyyy hh:MI:ss')+1 " & _
"GROUP BY A,B,C "
I have such SQL statements in my excel vba. I succeed to retrieve the data and show the date. Bt it suppose to show date with time like 16/4/2013 7:05:34, bt it shows only 16/4/2013. When double click on the cell, then it will show the time and the above tab also will show include time when you double click.
How to I show it straight away on the cell without I double click it?
2. I have searched on google that "Transform and Pivot" are only use in Ms Access, it wouldn't work with Ms Excel. So instead of using that, which way can I use to retrieve data according to few columns?
Thanks everyone.