Javier,
In spanish we use dates in format dd/mm/yyyy, but in databases de format is
mm/dd/yyyy.
You need to transform your FORM dates from dd/mm/yyyy to mm/dd/yyyy to
record them in your database, and when you query them, transform them from
mm/dd/yyyy to dd/mm/yyyy for users view.
I use next code for transform from dd/mm/yyyy to mm/dd/yyyy:
<cfset fecha = FORM.miFecha>
<cfif fecha is not "">
<cfset xdia = left(fecha,2)>
<cfset xmes = mid(fecha,4,2)>
<cfset xanio = right(fecha,4)>
<cfset FORM.miFecha = "#xmes#/#xdia#/#xanio#">
</cfif>
And when query date from database, I use dateformat function:
#dateformat(miquery.fecha,"dd/mm/yyyy")#
Hope it works for you.
-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de
Javier Flores
Enviado el: Viernes, 27 de Mayo de 2005 04:30 p.m.
Para: [email protected]
Asunto: dateFormat
Hi Everyone!
I'm writing the date on the "spanish" format dd/mm/yyyy... but when Do I try
to add it to the server it show it to me mm/dd/yyyy... I'm making it in the
following way... #dateFormat(ultimasalida,"dd/mm/yyyy")#, but it still show
me... mm/dd/yyyy, do I have any other way?
Javier
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm
___________________________________________________________
Correo revisado por la protecci�n antivirus de CFE.
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm