GetDate() doesn't have a format. The function returns a value of type datetime. Thus you can compare it directly to other datetime values.
Datetime value may have a
default format - like dd/mm/yyyy hh:mm:ss which will be used when converting a datetime to a character string (you can override and/or change this), but if all your expressions are using datetime datatypes, then the string format has nothing to do with it.
Also, you'll be better off in the long run to use the date manipulation functions, like DATEADD, to modify datetime values, rather than directly subtracting, as:
...WHERE datejoined BETWEEN DATEADD(d, -2, GetDate()) AND GetDate()
Also, be careful of the time portion of a datetime. A datetime
always contains a time portion as well as a date, so you must take care to account for that in your comparisons.
Jeff Mason
Custom Apps, Inc.
www.custom-apps.com