PhilPPhillips
MIS
I am creating a spreadsheet that directy queries my Macola database (MS SQL server).
My question is how do you bring in a Macola date field that is recognized as a date by excel?
If I use this expression in my select statement I get a text field in Excel that looks like a date.
substring(convert(varchar(8),IMINVTRX_SQL.trx_dt),5,2)+'/'+substring(convert(varchar(8),IMINVTRX_SQL.trx_dt),7,2)+'/'+substring(convert(varchar(8),IMINVTRX_SQL.trx_dt),3,2) AS 'trx_dt'
If I use this next expression I get a date field in excel. But, because a query using this expression cannot be shown graphically in the SQL designer I can't use parameters in the query. And I need parameters so that that the spreadsheet can be refreshed periodically with a new date range.
cast(convert(varchar(8),IMINVTRX_SQL.trx_dt,112) as datetime)
Hope this makes sense, any idea? Thanks ...
My question is how do you bring in a Macola date field that is recognized as a date by excel?
If I use this expression in my select statement I get a text field in Excel that looks like a date.
substring(convert(varchar(8),IMINVTRX_SQL.trx_dt),5,2)+'/'+substring(convert(varchar(8),IMINVTRX_SQL.trx_dt),7,2)+'/'+substring(convert(varchar(8),IMINVTRX_SQL.trx_dt),3,2) AS 'trx_dt'
If I use this next expression I get a date field in excel. But, because a query using this expression cannot be shown graphically in the SQL designer I can't use parameters in the query. And I need parameters so that that the spreadsheet can be refreshed periodically with a new date range.
cast(convert(varchar(8),IMINVTRX_SQL.trx_dt,112) as datetime)
Hope this makes sense, any idea? Thanks ...