|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, April 15, 2013 6:45 AM
Points: 2,
Visits: 33
|
|
I finally got it last night. What you have to do is a few converts on the datetime field. Here is a quick example...
--Exporting to Excel DECLARE @cdate NVARCHAR(MAX) SET @cdate = '2012-03-24T00:00:00' -- XML DATTIME SET @params = '<params><param name="cdate" value="' + @cdate + '" /></params>' exec prc_ExportToExcel 'Your Stor Proc', 'Your File Loc', 'Name', @params
--Stor Proc Examp DECLARE @cdate DATETIME SELECT Date FROM Table WHERE (Table.Date <= CONVERT(DATETIME, @cdate, 126)) --126 lets SQL know that it is a XML DATETIME format, and converts it to SQL DATETIME format
Hope this helps someone who may need to do the same thing I was working on :)
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: 2 days ago @ 8:33 PM
Points: 1,
Visits: 27
|
|
Thanks!!! This saved a great deal of my time!
|
|
|
|