I just started working with MS SQL Server, i imported my database from MS Access, and now i would like to set the date to a default dd/mm/yy without the time and the 4 digits in the year. I have used getdate()but this gives me full date and time. How can i achieve this? Many thanks for any help.
I think i understand what you want to do, but as i explained in my email this is my second day using ms sql server, and i wouldnt know where to stick all the code, i was thinking i could sort my problem out along these lines CREATE PROCEDURE users_date @MyDate DateTime AS DECLARE @DateOnly DateTime SELECT @DateOnly = CONVERT(DateTime,CONVERT(VARCHAR(8),@MyDate,103)) SELECT * FROM Members, Activity WHERE cp_date = @DateOnly (although i dont know how to connect the procedure with the two date fields in my two tables). Thanks for your help.
If you were a tree, what sort of tree would you be? This tiny ad is a poop beast.