FoxPro/Visual FoxPro - gracias PABLO DE ARGENTINA

 
Vista:

gracias PABLO DE ARGENTINA

Publicado por ALBERTO JUAN FRANCISCO (404 intervenciones) el 13/07/2009 07:22:45
MUCHAS GRACIAS PABLO POR TUS LINKS, DESPUES DE MUCHAS HORAS DE QUEMARME LA CABEZA LOGRE SACAR EL CALCULO DE HORAS ENTRE DOS FECHAS Y PONIENDO UN INTERVALO DE XX HORAS, DEJO EL CODIGO PARA ALGUNOS DE LOS FORISTAS QUE LES INTERESE

BOTON GRABAR TURNOS
SET HOURS TO 24 PARA QUE GRABE 13 HS 16 HS 20 HS ETC
WAIT WIND "Grabando Turnos , espere por Favor ......" nowait

primeradia=thisform.text1.value CAMPO DATETIME()

d=str(day(primeradia))
m=str(month(primeradia))
a=str(year(primeradia))
hor=substr(TTOC(primeradia,2),1,5) ACA SACO SOLO LA HORA DEL CAMPO DATETIME()
final=alltrim (d)+ "/" + alltrim (m)+ "/" +alltrim(a)
final= CTOD(final) ACA SACO SOLO LA FECHA DEL CAMPO DATETIME()
dato2=final
dato1=hor
fechafinal=final+thisform.text4.value ESTA EL LA FECHA FINAL DEL CALCULO
thisform.text4.value ES DURANTE CUANTOS DIAS SUMO LAS HORAS
nuevafecha=thisform.text1.value
do while .t.
if dato2 > fechafinal
exit
endif
select tareas
set order to 1
go bottom
xnro=tareas.nro
set order to 2
append blank
rlock()
repla nro with xnro+1
repla hora with dato1
repla fecha with dato2

repla dia with diass[dow(dato2)]
repla codigo with thisform.codigo1.value
repla tarea with thisform.combo1.value
repla lugar with thisform.lugar1.value
* repla cliente with thisform.cliente1.value
* repla domicilio with thisform.domicilio1.value
* repla telefono with thisform.telefono1.value
repla notas with thisform.notas1.value
* repla precio with thisform.precio1.value*
* repla paciente with thisform.paciente1.value
* repla pedigree with thisform.text1.value
* if thisform.check1.value=1
* repla abono with .t.
* else
* repla abono with .f.
* endif
flush
unlock all

nuevafecha=nuevafecha+(3600*val(thisform.text2.value)) ACA SUMO LAS HORAS
thisform.calcular


enddo
messagebox("Turnos Grabados Exitosamente !!","Veter 1.5")
THISFORM.RElease

************************
thisform.calcular

d=str(day(nuevafecha))
m=str(month(nuevafecha))
a=str(year(nuevafecha))
final3=alltrim (d)+ "/" + alltrim (m)+ "/" +alltrim(a)
final3= CTOD(final3)
dato2=final3
dato1=substr(TTOC(nuevafecha,2),1,5)
VUELVO A SACAR LA FECHA Y HORA
*************************

SALUDOS Y ESPERO LES SIRVA A ALGUIEN ESTE CODIGO VALIOSO JEJE
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:gracias PABLO DE ARGENTINA

Publicado por Pablo (Argentina) (433 intervenciones) el 13/07/2009 16:00:54
Hola Alberto, Bueno, veo que te sirvieron mis links, me alegro que a pesar de que te quemastes las cabeza pudistes resolver tu problema. Bueno para eso esta este foro para ayudarnos, a mi tambien me han ayudado mucho y es por eso que tambien entro todos los dias y lo leo y si puedo tiro algunas ideas o datos. o bien busco y se los paso como fue en tu caso.

Bueno, suerte con tu proyecto y aca estaremos para nuevas consultas

Pablo - Argentina
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:gracias PABLO DE ARGENTINA

Publicado por alberto (404 intervenciones) el 13/07/2009 20:27:18
ok amigo gracias y espero sirva mi codigo para alguien, yo tambien entro al foro todos los dias hace como 5 años, son geniales aca gente muy buena y cuando puedo tiro mis conocimientos a gente q lo necesita, yo programo en fox hace como 10 años ya.
saludos.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar