Ver Mensaje Individual
  #4 (permalink)  
Antiguo 08/02/2004, 22:54
Avatar de HiTek
HiTek
 
Fecha de Ingreso: noviembre-2003
Ubicación: LF, Santiago.Chile
Mensajes: 217
Antigüedad: 23 años
Puntos: 0
De momento te puedo pasar este código que simplemente obtiene la fecha del año anterior...no está perfectamente validada cnsiderando los años bisiestos y todo eso pero de algo te podria ayudar eventualmente...salu2

Código PHP:
Private Sub Form_Load()
    
Dim FechaLimite As Date
    FechaLimite 
= GetDate
    Text1
.Text = Format(Date, "DD/MM/YYYY")
    
Text2.Text = FechaLimite
End Sub

Function GetDate() As Date
    Dim FechaFch 
As Date
    Dim FechaSTR 
As String
    Dim Dia 
As Variant
    Dim Mes 
As Variant
    Dim Anio 
As Variant
    Dim FrstSlash 
As Byte
    Dim ScndSlash 
As Byte

    FechaFch 
= Format(Date, "DD/MM/YYYY")
    
    
FechaSTR = CStr(FechaFch)

    
FrstSlash = InStr(1, FechaSTR, "/")
    
ScndSlash = InStr(FrstSlash + 1, FechaSTR, "/")

    
Dia = Mid$(FechaSTR, 1, 2)
    
Mes = Mid$(FechaSTR, FrstSlash + 1, 2)
    
Anio = Mid$(FechaSTR, ScndSlash + 1, 4)
    
Anio = Val(Anio) - 1

    GetDate 
= CDate(dia & "/" & Mes & "/" & Anio)
End Function