Date format

QuertonQuerton Posts: 11
edited October 1, 2005 9:42AM in SQL Toolkit Previous Versions
Hello again,

I've a quick question regarding how compare dates.
I want to compare 2 date field in 2 db. I think (for what I've noticed) that toolkit compare date with time formatted with HH:MM:SS.fff (ex. 10:23:45.113).

My situation is that I really need to synchronize the date but I don't really need to be so precise.
If I can compare two dates with the following format [yyyy/MM/dd hh:mm] it will be great.

Is it possible to do it & if so how ?

Thanks in advance



  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello Pierre,

    If you're getting rows of data from a SQL Data Compare ResultsStore using the GetRow() method, then any date fields should be returned in an object with a Date datatype. These can be compared using standard logical operators (<,>,||,==) so you could simply say if (date_a > date_b)...

    The date format that this will become if you convert it to text depends on your system culture location. You can influence it somewhat using Date.ToString(<string format>) function if you'd like.
Sign In or Register to comment.