Viewing 11 posts - 1 through 11 (of 11 total)
Dohhh. Many thanks for your help. I couldn't see the wood for the trees obviously.
A really useful function.
March 11, 2013 at 10:58 am
ALTER FUNCTION [dbo].[fnDateFormat] (@Datetime DATETIME, @Format VARCHAR(32))
RETURNS VARCHAR(32)
AS
BEGIN
DECLARE @DateValue VARCHAR(32)
SET @DateValue = @Format
...
March 11, 2013 at 10:09 am
I thought it might be something to do with the version of SQL Server I am using (2000) so tried it on 2008R2 and get the same result.
I'm not too...
March 11, 2013 at 10:02 am
Thanks for the prompt reply. The issue I get is as follows:
select [dbo].[fnDateFormat](getdate()-3,'dd/mm/yyyy')
-- today is the 11th so the minus 3 is to get a date in...
March 11, 2013 at 8:50 am
A very good function however it seems to miss the leading zero off dates that are in the first 9 days of the month when using a format of 'dd/mm/yy'...
March 11, 2013 at 3:21 am
I think the comparison operators in the example above were the wrong way round. I have used the following against a date column in a test system of mine...
January 29, 2013 at 4:18 am
Many thanks for all the answers here particularly the ones from Jeff and Karthik. They enable me to get rid of a lot of CASE statements! 🙂
September 3, 2012 at 2:16 am
Mmmm.
Now this may sound like a stupid question to some of the "guru's" on this forum. Why is there a need for a master table and a separate...
April 18, 2012 at 3:39 am
GilaMonster (3/22/2012)
One important point... Do not assume the inserted table contains a single row. It may not. It will contain all the rows affected by the update.
This is an interesting...
March 23, 2012 at 5:48 am
I always add columns to a table that records the date and time a record was created and by whom. I also have columns to show when records were...
February 19, 2012 at 11:07 am
Thanks for this. i have downloaded your example database and apart from a few errors on built in functions for some reason I have got it working on the...
February 14, 2012 at 10:07 am
Viewing 11 posts - 1 through 11 (of 11 total)