Thanks for taking a look at my question.
I'm sending data to corporate for analysis by their programmers, However, this past Friday I received the following email (emphasis supplied by me).
Here's the problem:
The code I'm using was nicely provided by gmmastros over on Link: this thread. (gmmastros: if you're reading this; the code is working beautifully, thanks again!)
The above code gives me the format they've requested (MM/DD/YYYY), but apparently their system treats the data I'm giving them as a string.
If I try and convert the varchar(10) back into a datetime field (lets use today's date: 01/15/07) I get 2007/01/15 00:00:00:000 as the result.
I guess the bottom line is this: Can I give corporate a DATETIME field that is only 10 chracters long in the form of MM/DD/YYYY?
I'm sending data to corporate for analysis by their programmers, However, this past Friday I received the following email (emphasis supplied by me).
I've had a specific request to ask if you could change your date fields in your views to be date fields rather than string. It makes it much easier to extract specific date ranges when doing the loads. If you could do this for us we would appreciate it. Please make sure you provide only the date and not a date with time.
Here's the problem:
The code I'm using was nicely provided by gmmastros over on Link: this thread. (gmmastros: if you're reading this; the code is working beautifully, thanks again!)
Code:
,CASE
WHEN MBF9.FEGHNB = '0' THEN '0'
WHEN MBF9.FEGHNB <> '0' THEN CONVERT(VarChar(10), Convert(DateTime, Convert(VarChar(8), MBF9.FEGHNB + 19000000)), 101)
END AS INVOICE_DATE
The above code gives me the format they've requested (MM/DD/YYYY), but apparently their system treats the data I'm giving them as a string.
If I try and convert the varchar(10) back into a datetime field (lets use today's date: 01/15/07) I get 2007/01/15 00:00:00:000 as the result.
I guess the bottom line is this: Can I give corporate a DATETIME field that is only 10 chracters long in the form of MM/DD/YYYY?