L
Ling
How can I replace {ts '1990-12-31 00:00:00'} in the query
macro with any time I want? For example, I defined a
string called LastTime, and set LastTime = "2003-07-23
00:00:00". But {ts 'LastTime'} will not work.
{ts '1990-12-31 00:00:00'} is ANSI standard datetime format
Here are few lines from my macro:
With Selection.QueryTable
..Connection = _
"ODBC;DRIVER=
{MicrosoftODBCforOracle};UID=ICL;PWD=USER;SERVER=VGSM;"
..CommandText = Array( _
"SELECT SAMPLE_ACTIVE.LOGIN_DATE" & Chr(10) & "FROM
VGSM.SAMPLE_ACTIVE SAMPLE_ACTIVE" _
& Chr(10) _
& "WHERE (SAMPLE_ACTIVE.LOGIN_DATE>{ts '1990-12-31
00:00:00'})")
..Refresh
End With
macro with any time I want? For example, I defined a
string called LastTime, and set LastTime = "2003-07-23
00:00:00". But {ts 'LastTime'} will not work.
{ts '1990-12-31 00:00:00'} is ANSI standard datetime format
Here are few lines from my macro:
With Selection.QueryTable
..Connection = _
"ODBC;DRIVER=
{MicrosoftODBCforOracle};UID=ICL;PWD=USER;SERVER=VGSM;"
..CommandText = Array( _
"SELECT SAMPLE_ACTIVE.LOGIN_DATE" & Chr(10) & "FROM
VGSM.SAMPLE_ACTIVE SAMPLE_ACTIVE" _
& Chr(10) _
& "WHERE (SAMPLE_ACTIVE.LOGIN_DATE>{ts '1990-12-31
00:00:00'})")
..Refresh
End With