pass two dates as parameter captured in a TextBox
Forums
Hello everyone,
I am making a menu which has several cases, in each case I have to do the date conversion routine, what I need is to create a function where I return the values in the desired format, so as not to have to repeat the codes of conversion of the date in each case.
Thank you
Example.
Case 0
X1 = xMenu.TextBox1, X2 = xMenu.TextBox2
Xano1 = Mid(X1,1,4)
Xmes1 = Mid(X1,6,2)
dias1 = Mid(X1,9,2)
fecha1 = LTrim(Xdias1)+ LTrim(Xmes1)+ LTrim(Xano1)
Xano2 = Mid(X2,1,4)
Xmes2 = Mid(X2, 6,2)
Xdias2 = Mid(X2 ,9,2)
Fecha2 = LTrim(Xdias2)+ LTrim(Xmes2)+ LTrim(Xano2)
Client.WorkingDirectory = "A:\Auditoria\Auditoria_continua\Proyectos_Auditoria_Continua_02\Proy_TD\Macros.ILB"
Client.RunIDEAScript "Script_TD_Primero.iss"
'
case 1
X1 = xMenu.TextBox1
X2 = xMenu.TextBox2
Xano1 = Mid(X1,1,4)
Xmes1 = Mid(X1,6,2)
dias1 = Mid(X1,9,2)
fecha1 = LTrim(Xdias1)+ LTrim(Xmes1)+ LTrim(Xano1)
'---------------
Xano2 = Mid(X2,1,4)
Xmes2 = Mid(X2, 6,2)
Xdias2 = Mid(X2 ,9,2)
Fecha2 = LTrim(Xdias2)+ LTrim(Xmes2)+ LTrim(Xano2)
Client.WorkingDirectory = "A:\Auditoria\Auditoria_continua\Proyectos_Auditoria_Continua_02\Proy_TD\Macros.ILB"
Client.RunIDEAScriptEx"A:\Auditoria\Auditoria_continua\Proyectos_Auditoria_Continua_02\Proy_TD\Macros.ILB\Script_TD_Segundo.iss",Fecha1,Fecha2 ,"",""