Red Gate forums :: View topic - Comparing a DATETIME field and DATE field
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare 10
SQL Data Compare 10 forum

Comparing a DATETIME field and DATE field

Search in SQL Data Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
ralindblom



Joined: 19 Jun 2007
Posts: 3

PostPosted: Fri Aug 31, 2012 3:07 pm    Post subject: Comparing a DATETIME field and DATE field Reply with quote

Is there any way of comparing a DATETIME field and DATE field? The time field has 00:00:00.000 so I really am just looking to compare the date portion of both fields.
Back to top
View user's profile Send private message
Manfred.Castro



Joined: 23 Apr 2012
Posts: 209

PostPosted: Fri Aug 31, 2012 6:46 pm    Post subject: Reply with quote

You should have no problem comparing a DATETIME field and DATE field.
http://www.red-gate.com/supportcenter/Content/SQL_Data_Compare/help/10.0/SDC_Which_Data_Types_Can_Be_Compared
You can try to set up a view in the source DB and compare to that instead, so there's more control over how the info is presented.
_________________
Manfred Castro
Product Support
Red Gate Software
Back to top
View user's profile Send private message
ralindblom



Joined: 19 Jun 2007
Posts: 3

PostPosted: Fri Aug 31, 2012 6:54 pm    Post subject: Reply with quote

While the compare happens every items comes back as a difference. I would like to have a date such as 2012-12-31 be shown to equal 2012-12-31 00:00:00.000. Currently they show up as mismatches.
Back to top
View user's profile Send private message
Manfred.Castro



Joined: 23 Apr 2012
Posts: 209

PostPosted: Fri Aug 31, 2012 7:52 pm    Post subject: Reply with quote

You can try using a view to manipulate the data and compare against the view.
_________________
Manfred Castro
Product Support
Red Gate Software
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group