-
Estoy intentando sacar una fecha de un campo datetime desde SQL, pero me la devuelve con el formato
Dec 21 2005 5:01PM ```y necesitaria algo del estiloMM-DD-AAAA
MM DD AAAA o MMDDAAAA
El no usar ni la / ni los : es porque necesito que el resultado vaya en el nombre de un fichero. Como handicap adicional, decir que es una BDD Sybase SQL Server 11.9.2 del año de maricastaña. Alguna idea? -
-
muchas gracias ruso, por fin lo he conseguido con
CONVERT(VARCHAR(10), titles.last_modif_time, 110) -
Bueno llego tarde pero si quieres tambien puede hacerlo con la funcion to_char
TO_CHAR(fecha, 'MM-DD-YYYY')
Saludos.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Registrarse Conectarse