|
Qual formato para gravar num campo Data |
Débuté par Mister ANDRE MARTINI, 28 juil. 2016 22:24 - 3 réponses |
| |
| | | |
|
| |
Membre enregistré 212 messages Popularité : +25 (25 votes) |
|
Posté le 28 juillet 2016 - 22:24 |
Olá,
tenho uma tabela de movimento de estoque que é alimentada pelas telas de compras e vendas e criei uma procedure para lançar os dados nesta tabela, porém estou tendo problema por causa do campo data que tem na tabela, estou fazendo da seguinte forma:
na tela que chama a procedure tem um campo EDT do tipo data com return value igual a YYYYMMDD e chamo a procedure assim:
Movimento_Estoque_Novo("ENTRADA","ENT",StringToDate(EDT_Data_de_emissao),EDT_Codigo_do_produto,EDT_Quantidade,0,EDT_Numero_da_entrada,0,0,0,Entradas_itens.Numero_do_item)
este é o cabeçalho da procedure
Procedure Movimento_Estoque_Novo(sTipo is string, sOrigem is string, dDataMov is Date, nCodigoProduto is 8-byte unsigned int, rQuantidade is numeric, nPedido is 4-byte unsigned int, nEntrada is 4-byte unsigned int, nOS is 4-byte unsigned int, nDevolucao is 8-byte unsigned int, nEmprestMerc is 4-byte unsigned int, nSeqItem is 4-byte unsigned int)
O que está errado e como deve tratar os campos do tipo DATA para este tipo de situação?
-- André Martini IS2 Automotive http://www.is2.inf.br/is2automotive/index.html IS2 Construtive http://www.is2.inf.br/is2construtive/index.html IS2 Store http://www.is2.inf.br/is2store/index.html IS2 Gerent http://www.is2.inf.br/is2gerent/index.html |
| |
| |
| | | |
|
| | |
| |
Posté le 01 août 2016 - 15:13 |
Olá ANDRE MARTINI, tente passar somente o "EDT_Data_de_emissao",como parâmetro, retire a FUNÇÃO StringToDate |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 212 messages Popularité : +25 (25 votes) |
|
Posté le 01 août 2016 - 19:48 |
assima também funcionou! Obrigado
dDataEmissao is Date = ""
dDataEmissao..Day = EDT_Data_de_emissao[[7 TO 8]] dDataEmissao..Month = EDT_Data_de_emissao[[5 TO 6]] dDataEmissao..Year = EDT_Data_de_emissao[[1 TO 4]] Movimento_Estoque_Novo("ENTRADA","ENT",dDataEmissao,EDT_Codigo_do_produto,EDT_Quantidade,0,EDT_Numero_da_entrada,0,0,0,Entradas_itens.Numero_do_item)
-- André Martini IS2 Automotive http://www.is2.inf.br/is2automotive/index.html IS2 Construtive http://www.is2.inf.br/is2construtive/index.html IS2 Store http://www.is2.inf.br/is2store/index.html IS2 Gerent http://www.is2.inf.br/is2gerent/index.html |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 3 659 messages Popularité : +175 (223 votes) |
|
Posté le 02 août 2016 - 21:24 |
Parabéns aos dois!
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 9949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.com.br/ |
| |
| |
| | | |
|
| | | | |
| | |
|