In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

TDatePicker

Foro público de Xailer en español
Responder
arroba
Mensajes: 3
Registrado: Vie Abr 01, 2005 8:19 am

TDatePicker

Mensaje por arroba »

El tDatePicker no respeta el formato seleccionado en SET DATE ....
Por ejemplo, si tengo seleccionado SET DATE GERMAN que pone la fecha
separada con puntos (01.04.2005), en el tDatePicker salen las barras
(01/04/2005).
Saludos,
Jose Alfonso Suárez
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

TDatePicker

Mensaje por jfgimenez »

José Alfonso,
> El tDatePicker no respeta el formato seleccionado en SET DATE ....
>
> Por ejemplo, si tengo seleccionado SET DATE GERMAN que pone la fecha
> separada con puntos (01.04.2005), en el tDatePicker salen las barras
> (01/04/2005).
Eso es porque este control es un control de windows, y utiliza el formato de fechas que esté configurado en el panel de control. No obstante, puedes cambiar el formato con la propiedad cCustomFormat. Los formatos válidos tienen esta forma (extraí­do del API):
Format Strings
A DTP format string consists of a series of elements that represent a particular piece of information and define its display format. The elements will be displayed in the order they appear in the format string.
Date and time format elements will be replaced by the actual date and time. They are defined by the following groups of characters:
Element Description
"d" The one- or two-digit day.
"dd" The two-digit day. Single-digit day values are preceded by a zero.
"ddd" The three-character weekday abbreviation.
"dddd" The full weekday name.
"h" The one- or two-digit hour in 12-hour format.
"hh" The two-digit hour in 12-hour format. Single-digit values are preceded by a zero.
"H" The one- or two-digit hour in 24-hour format.
"HH" The two-digit hour in 24-hour format. Single-digit values are preceded by a zero.
"m" The one- or two-digit minute.
"mm" The two-digit minute. Single-digit values are preceded by a zero.
"M" The one- or two-digit month number.
"MM" The two-digit month number. Single-digit values are preceded by a zero.
"MMM" The three-character month abbreviation.
"MMMM" The full month name.
"t" The one-letter AM/PM abbreviation (that is, AM is displayed as "A").
"tt" The two-letter AM/PM abbreviation (that is, AM is displayed as "AM").
"yy" The last two digits of the year (that is, 1996 would be displayed as "96").
"yyyy" The full year (that is, 1996 would be displayed as "1996").
To make the information more readable, you can add body text to the format string by enclosing it in single quotes. Spaces and punctuation marks do not need to be quoted.
Note Nonformat characters that are not delimited by single quotes will result in unpredictable display by the DTP control.
For example, to display the current date with the format "'Today is: 04:22:31 Tuesday Mar 23, 1996", the format string is "'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy". To include a single quote in your body text, use two consecutive single quotes. For example, "'Don''t forget' MMM dd',' yyyy" produces output that looks like: Don't forget Mar 23, 1996. It is not necessary to use quotes with the comma, so "'Don''t forget' MMM dd, yyyy" is also valid, and produces the same output.
--
Un saludo,
José F. Giménez
--
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
jasm.nospam
Mensajes: 203
Registrado: Vie Abr 01, 2005 9:05 am

TDatePicker

Mensaje por jasm.nospam »

Jose,
Ya me imaginaba que era por eso.
Gracias y un saludo
Jose A. Suarez
Jose F. Gimenez escribió:
> José Alfonso,
>
> > El tDatePicker no respeta el formato seleccionado en SET DATE ....
> >
> > Por ejemplo, si tengo seleccionado SET DATE GERMAN que pone la fecha
> > separada con puntos (01.04.2005), en el tDatePicker salen las barras
> > (01/04/2005).
> Eso es porque este control es un control de windows, y utiliza el
> formato de fechas que esté configurado en el panel de control. No
> obstante, puedes cambiar el formato con la propiedad cCustomFormat. Los
> formatos válidos tienen esta forma (extraí­do del API):
>
>
>
> Format Strings
>
> A DTP format string consists of a series of elements that represent a
> particular piece of information and define its display format. The
> elements will be displayed in the order they appear in the format string.
>
> Date and time format elements will be replaced by the actual date and
> time. They are defined by the following groups of characters:
>
> Element Description
> "d" The one- or two-digit day.
> "dd" The two-digit day. Single-digit day values are preceded by a zero.
> "ddd" The three-character weekday abbreviation.
> "dddd" The full weekday name.
> "h" The one- or two-digit hour in 12-hour format.
> "hh" The two-digit hour in 12-hour format. Single-digit values are
> preceded by a zero.
> "H" The one- or two-digit hour in 24-hour format.
> "HH" The two-digit hour in 24-hour format. Single-digit values are
> preceded by a zero.
> "m" The one- or two-digit minute.
> "mm" The two-digit minute. Single-digit values are preceded by a zero.
> "M" The one- or two-digit month number.
> "MM" The two-digit month number. Single-digit values are preceded by a
> zero.
> "MMM" The three-character month abbreviation.
> "MMMM" The full month name.
> "t" The one-letter AM/PM abbreviation (that is, AM is displayed as "A").
> "tt" The two-letter AM/PM abbreviation (that is, AM is displayed as "AM").
> "yy" The last two digits of the year (that is, 1996 would be displayed
> as "96").
> "yyyy" The full year (that is, 1996 would be displayed as "1996").
>
> To make the information more readable, you can add body text to the
> format string by enclosing it in single quotes. Spaces and punctuation
> marks do not need to be quoted.
>
> *Note* Nonformat characters that are not delimited by single quotes
> will result in unpredictable display by the DTP control.
>
> For example, to display the current date with the format "'Today is:
> 04:22:31 Tuesday Mar 23, 1996", the format string is "'Today is:
> 'hh':'m':'s dddd MMM dd', 'yyyy". To include a single quote in your body
> text, use two consecutive single quotes. For example, "'Don''t forget'
> MMM dd',' yyyy" produces output that looks like: Don't forget Mar 23,
> 1996. It is not necessary to use quotes with the comma, so "'Don''t
> forget' MMM dd, yyyy" is also valid, and produces the same output.
>
>
> --
> Un saludo,
>
> José F. Giménez
>
jlalin
Mensajes: 926
Registrado: Sab Dic 25, 2010 11:10 pm

TDatePicker

Mensaje por jlalin »

José Alfonso,
también puedes hacer algo así­:
CLASS TMyDatePicker FROM TDatePicker
METHOD Create( oParent, ... )
ENDCLASS
METHOD Create( oParent, ... ) CLASS TMyDatePicker
::cCustomFormat := ElFormatoQueQuieras
Super:Create( oParent, ... )
RETURN Self
No lo he probado pero deberí­a funcionar sin problema.
Saludos,
José Lalí­n
Responder