0

I have SQL code like this:

select Date from AAA where ID = 1

Date value for ID = 1 is '2015-03-16'

When I execute in SQL Server it shows '2015-03-16'. But why if I execute the same query in .cfm it shows '2015-03-14' ?

All of data will have different 2 days between SQL Server and .cfm ?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 1
    .cfm is probably based on the same 0-date as Excel (1899-12-30 instead of 1900-01-01). Are you sure your data type is correct? Are you sure .cfm knows what the data type should be? Seems like at least one translation to integer is happening. – Aaron Bertrand Mar 17 '15 at 03:01
  • How are you outputting it to the cfm page? Please post the actual code you're using. – Matt Busche Mar 17 '15 at 03:12
  • i solve the problem. i change data type from Date to Date time. Thanks :D – Gede Ardiasa Mar 17 '15 at 03:30

0 Answers0