Ver Mensaje Individual
  #6 (permalink)  
Antiguo 30/07/2012, 11:52
Avatar de yetrus
yetrus
 
Fecha de Ingreso: marzo-2006
Mensajes: 252
Antigüedad: 18 años, 1 mes
Puntos: 0
Respuesta: Problemas con fechas sql 2008 en W7 Esp y W2003 Ing

Cita:
Iniciado por Libras Ver Mensaje
creo que deberias de revisar cual es el codigo de esta funcion

socio.fn_todate(2011, 01, 01) quizas donde funciona agarre un formato de fecha y donde no uno diferente.

saludos!
esta es la funcion

Código:
ALTER FUNCTION [socio].[fn_todate] 
(
	@year int
	,@month int
	, @day int
)
RETURNS datetime
AS
BEGIN
	DECLARE @sReturnValue datetime

	-- Add the T-SQL statements to compute the return value here
	--SELECT <@ResultVar, sysname, @Result> = <@Param1, sysname, @p1>
	select @sReturnValue = CONVERT(datetime, CONVERT(char(10), cast(@year as varchar) + '-'+cast(@day as varchar)+'-'+cast(@month as varchar), 111))

	-- Return the result of the function
	RETURN @sReturnValue

END