Fórum Calculo de hora x turno em tabela #277979
19/04/2005
0
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
Curtir tópico
+ 0Posts
19/04/2005
Edilcimar
turno := turnodesejado
Gostei + 0
19/04/2005
Juarezber
Grato
Juarez
Gostei + 0
19/04/2005
Rjun
if (hora >= 6) and (hora <= 14) then turno = 1 else if (hora >= 14) and (hora <= 22) then turno = 2 else turno = 3;
Gostei + 0
01/05/2017
Joao
if (hora >= 6) and (hora <= 14) then
turno = 1
else if (hora >= 14) and (hora <= 22) then
turno = 2
else
turno = 3;
[/code:1:62cb2e382c]
MAIS NESSE CASO SE EU COLOCAR TIPO 25 O TURNO VAI SER A NOITE E AS HORAS É ATE 24, CORRETO
Gostei + 0
01/05/2017
Joao
{$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
Clique aqui para fazer login e interagir na Comunidade :)