|
Inicio → WINDEV 25 → Converte Inteiro Para Data Boller = PADRAO CLARION PARA PADRAO WINDEV |
Converte Inteiro Para Data Boller = PADRAO CLARION PARA PADRAO WINDEV |
Iniciado por Boller, 26,sep. 2022 22:50 - No hay respuesta |
| |
| | | |
|
| |
Miembro registrado 4.521 mensajes |
|
Publicado el 26,septiembre 2022 - 22:50 |
// Summary: <specify the procedure action> // Syntax: //[ <Result> = ] ConverteInteiroParaDataBoller (<pDataInteiro>, <DMA>) // // Parameters: // pDataInteiro: <specify the role of pDataInteiro> // DMA: <specify the role of DMA> // Return Value: // ANSI string: // None // // For instance: // Indicate an example. // PROCEDURE ConverteInteiroParaDataBoller(pDataInteiro,DMA)
sData is string = ""
IF DateValid(pDataInteiro) = True THEN //Se for uma data valida entao nao converto pois data ja é valida sData = pDataInteiro ELSE IF pDataInteiro = "" OR pDataInteiro = 0 THEN sData = "" ELSE IF DMA = "D" sData = IntegerToDate(pDataInteiro,"D") ELSE IF DMA = "M" sData = IntegerToDate(pDataInteiro,"M") ELSE IF DMA = "A" sData = IntegerToDate(pDataInteiro,"A") END END END
RESULT sData
MODO DE USAR
DIA IS INT = ConverteInteiroParaDataBoller(80991,"D") //29
MES IS INT = ConverteInteiroParaDataBoller(80991,"M") //09
ANO IS INT = ConverteInteiroParaDataBoller(80991,"A") //2021
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 99949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.com.br/ |
| |
| |
| | | |
|
| | | | |
| | |
|