Calculo de hora x turno em tabela
Pessoal, Tenho uma tabela que salva, em tempo determinado, dentre outros campos, tem hora e turno. A hora é automatica, mas o turno
não estou conseguindo. Ex:
6:00 as 14:00 = turno 1
14:00 as 22:00 = turno 2
22:00 as 6:00 = turno 3
Preciso colocar o turno no campo turno automaticamente, igual
a tabela acima.
Grato
juarezber@terra.com.br
não estou conseguindo. Ex:
6:00 as 14:00 = turno 1
14:00 as 22:00 = turno 2
22:00 as 6:00 = turno 3
Preciso colocar o turno no campo turno automaticamente, igual
a tabela acima.
Grato
juarezber@terra.com.br
Juarezber
Curtidas 0
Respostas
Edilcimar
19/04/2005
if (hora>=horax) and (hora <= horay) then
turno := turnodesejado
turno := turnodesejado
GOSTEI 0
Juarezber
19/04/2005
Amigo, fico agradecido se for mais detalhado
Grato
Juarez
Grato
Juarez
GOSTEI 0
Rjun
19/04/2005
if (hora >= 6) and (hora <= 14) then turno = 1 else if (hora >= 14) and (hora <= 22) then turno = 2 else turno = 3;
GOSTEI 0
Joao
19/04/2005
if (hora >= 6) and (hora <= 14) then turno = 1 else if (hora >= 14) and (hora <= 22) then turno = 2 else turno = 3;
MAIS NESSE CASO SE EU COLOCAR TIPO 25 O TURNO VAI SER A NOITE E AS HORAS É ATE 24, CORRETO
GOSTEI 0
Joao
19/04/2005
program Turnos_Horarios;
{$APPTYPE CONSOLE}
uses
SysUtils;
Var Entrada:Real;
begin
Writeln('HORARIOS DE TURNOS');
Writeln('');
Writeln('Hora de Entrada de Funcionarios');
Readln(Entrada);
If Entrada = 6 Then
Begin
Writeln( 'TURNO 1 ');
Readln;
End;
If Entrada = 14 Then
Begin
Writeln('TURNO 2');
Readln;
End;
if (Entrada = 22)Then
Begin
Writeln('TURNO 3');
Readln;
end
Else If Entrada > 24 Then
Begin
Writeln('HORARIO INVALIDO');
Readln;
End
Else
Begin
Writeln('ENTRADA FORA DO PERMITIDO');
Writeln(' PROCURE SEU GERENTE');
Readln;
End;
end.
//ESPERO TER AJUDADO...
{$APPTYPE CONSOLE}
uses
SysUtils;
Var Entrada:Real;
begin
Writeln('HORARIOS DE TURNOS');
Writeln('');
Writeln('Hora de Entrada de Funcionarios');
Readln(Entrada);
If Entrada = 6 Then
Begin
Writeln( 'TURNO 1 ');
Readln;
End;
If Entrada = 14 Then
Begin
Writeln('TURNO 2');
Readln;
End;
if (Entrada = 22)Then
Begin
Writeln('TURNO 3');
Readln;
end
Else If Entrada > 24 Then
Begin
Writeln('HORARIO INVALIDO');
Readln;
End
Else
Begin
Writeln('ENTRADA FORA DO PERMITIDO');
Writeln(' PROCURE SEU GERENTE');
Readln;
End;
end.
//ESPERO TER AJUDADO...
GOSTEI 0