Ver Mensaje Individual
  #2  
Antiguo 11-01-2004
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 31
Lepe Va por buen camino
DayOfTheWeek(date:tdatetime)

Returns the day of the week represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function DayOfTheWeek(const AValue: TDateTime): Word;

Description

Call DayOfTheWeek to obtain the day of the week represented by a specified TDateTime value. DayOfTheWeek returns a value between 1 and 7, where 1 indicates Monday and 7 indicates Sunday.

Note: DayOfTheWeek is ISO 8601 compliant (where Monday is considered the first day of the week). To obtain the day of the week where Sunday is considered the first day of the week, use the DayOfWeek function instead.
Tip: To make the return value more readable, use the Day of week constants.

Si dayoftheweek(now) te dice que es el 3 (Miercoles)
Código:
  datepicker1.maxdate:= now+ (7-dayoftheweek(now))
saludos

Última edición por Lepe fecha: 11-01-2004 a las 20:48:52.
Responder Con Cita