Link to home
Start Free TrialLog in
Avatar of auk_ie
auk_ie

asked on

Get date without minutes and seconds?

Hello
In a stored proc I want to get todays date in the form dd/mm/yy and compare it against some datgetime fields in my tables how can I do this?
ASKER CERTIFIED SOLUTION
Avatar of sajuks
sajuks

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
see the CONVERT function help in BOL for complete list of formats
Avatar of sajuks
sajuks

This gives you the date in dd/mm/yy format...

SELECT CONVERT(VARCHAR(10),GETDATE(),3)

If you want it in dd/mm/yyyy format..you can use

SELECT CONVERT(VARCHAR(10),GETDATE(),103)

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial