|
51
|
Programación / Programación Visual Basic / Re: [RETO] IsDate
|
en: 13 Septiembre 2011, 03:58 am
|
Yo igual repare la mia... Public Function IsDate_T(ByRef Expresion As String) As Boolean On Error GoTo err Dim A As Integer Dim B As Integer Dim C As Integer Dim P1 As Integer Dim P2 As Integer Dim F As Boolean Dim F2 As Boolean P1 = InStr(1, Expresion, "/") If (Not CBool(P1)) Then Exit Function P2 = InStr(P1 + 1, Expresion, "/") If (Not CBool(P2)) Then Exit Function A = Mid(Expresion, 1, P1 - 1) B = Mid(Expresion, P1 + 1, P2 - P1 - 1) C = Mid(Expresion, P2 + 1, Len(Expresion)) If (A And &H20) Then Exit Function If (C And &H8000) Then Exit Function If (B And &H8) Then P1 = (B - &H8) If (P1 And &H4) Then P1 = (P1 - &H4) If (P1 And &H1) Then Exit Function Else F2 = True End If Else If (P1 And &H2) Then P1 = (P1 - &H2) If (P1 Or &H0) = &H0 Then F2 = True Else If (P1 Or &H0) = &H0 Then F2 = True End If End If Else If (B And &H4) Then P1 = (B - &H4) If (P1 And &H2) Then P1 = (P1 - &H2) If (P1 And &H1) Then F2 = True Else If (P1 And &H1) Then F2 = True End If Else If (B And &H2) Then P1 = (B - &H2) If (P1 And &H1) Then F2 = True Else If (B And &H1) Then F2 = True End If End If End If If (C And &H2000) Then P1 = (P1 - &H2000) If (P1 And &H400) Then P1 = (P1 - &H400) If (P1 And &H200) Then P1 = (P1 - &H200) If (P1 And &H100) Then P1 = (P1 - &H100) If (P1 And &H10) Then Exit Function End If End If End If End If F = (((Not CBool((C Mod &H4))) And CBool(C Mod &H64)) Or (Not CBool(C Mod &H190))) IsDate_T = True If (A And &H10) Then P1 = (A - &H10) If (P1 And &H10) Then If ((Not F2) And (Not F)) Then IsDate_T = False Else If (P1 And &H8) Then P1 = (P1 - &H8) If (P1 And &H4) Then P1 = (P1 - &H4) If P1 Then If (B = &H2) Then If (Not F) Then IsDate_T = False Else If (Not (P1 = &H1)) Then IsDate_T = False End If Else If (P1 And &H2) Then P1 = (P1 - &H2) If (P1 And &H1) Then IsDate_T = F2 Else If (P1 Or &H0) = &H0 Then IsDate_T = F2 Else IsDate_T = Not F2 End If End If End If End If End If End If End If End If End If err: End Function
@Psyke1: "31/02/2011" = True Salu2!
|
|
|
55
|
Foros Generales / Foro Libre / Entrevista a Ing. En Sistemas Computacionales
|
en: 6 Septiembre 2011, 02:57 am
|
Buenas noches (aca en mi querido pais), bueno cualquier ing en sistemas ya egresado que pueda ayudarme a contestar estas preguntas para un trabajo... se lo agradeceria mucho , la hago aqui ya que creo que hay mucha gente que tiene esta profesion, espero puedan ayudarme.. bueno aqui va el formato: Nombre: _______________________________ Fecha: __________ Sexo: _________ Empresa/Institución En La Que Trabaja: _______________________ Tiempo De Servicio/Antigüedad: _______________ Escuela En La Que Estudio: ________________ A. Ingreso: __________ A. Egreso: _________ Titulado: ____ Maestría: ____ Doctorado: ____
1) ¿Que le motivo a ser un ingeniero en sistemas computacionales?
2) ¿Que tiempo le llevo encontrar un trabajo al finalizar su carrera?
3) ¿Como aplica sus conocimientos obtenidos en la universidad en su vida profesional?
4) ¿El aprendizaje obtenido, puede usted aplicarlo en su trabajo laboral o requirió mas aprendizaje?
5) ¿Esta usted satisfecho con su trabajo actualmente y con la carrera que usted finalizo?
6) ¿Cuanto tiempo lleva desarrollar un software para una empresa, y cuales son los costos que evalúan?
7) ¿Que diferencias hay entre un ingeniero en sistemas computacionales y un licenciado en informática?
8) ¿Que practicas predominantes y emergentes hay hoy en dia en la ingeniería en sistemas computacionales?
9) ¿Es más fácil, difícil o igual manera ser ingeniero en sistemas computacionales hoy en dia? ¿Por que?
10) ¿Cuales son las plataformas para desarrollo software mas usadas en el trabajo que usted realiza?
11) ¿Con que otras áreas relaciona usted su carrera y puede desempeñarse en su ámbito laboral?
12) ¿Como influye la ingeniería en sistemas coputacionales en la economía del país?
13) ¿Cual es la contribución de un ingeniero en sistemas computacionales a nivel tecnológico y científico?
14) ¿Como mejoran los ingenieros en sistemas computacionales la seguridad y la administración de las empresas? Gracias por su tiempo para contestarlas, un saludo !.
|
|
|
59
|
Programación / Programación Visual Basic / Re: [RETO] IsDate
|
en: 29 Agosto 2011, 02:38 am
|
Public Function IsDate_T(ByRef Expresion As String) As Boolean On Error GoTo err Dim A As Integer Dim B As Integer Dim C As Integer Dim P1 As Integer Dim P2 As Integer Dim F As Boolean P1 = InStr(1, Expresion, "/") If (Not CBool(P1)) Then Exit Function P2 = InStr(P1 + 1, Expresion, "/") If (Not CBool(P2)) Then Exit Function A = Mid(Expresion, 1, P1) B = Mid(Expresion, P1 + 1, P2 - P1) C = Mid(Expresion, P2 + 1, Len(Expresion)) F = (((Not CBool((C Mod 4))) And CBool(C Mod 100)) Or (Not CBool(C Mod 400))) IsDate_T = Not ((C < 0) Or (C > 9999) Or (A < 1) Or (B < 1) Or (B > 12) Or (F And (A > 29) And (B = 2)) Or (Not F And (A > 28) And (B = 2))) err: End Function
Me pude haber ahorrado variables... pero el codigo no quedaria bien explicado y tal vez seria mas lento, o bien usar el "truco" del vb con una variable de tipo Date Salu2 !
|
|
|
|
|
|
|