Fórum Inverter datas #297132
26/09/2005
0
Obrigado!!
Dberlese
Curtir tópico
+ 0Posts
27/09/2005
Dberlese
Gostei + 0
27/09/2005
Massuda
Você vai criar um novo campo para receber a data no ´formato padrão´?
Se for usar um novo campo, qual seria o tipo dele?
Gostei + 0
27/09/2005
Martins
Qual banco vc tá utilizando? De q tipo é o campo?
Gostei + 0
27/09/2005
Dberlese
Obrigado!!
Gostei + 0
27/09/2005
Rjun
Gostei + 0
27/09/2005
Martins
Interessante...
Essa informação é importante.
Agora se for só para inverter a data e colocar em um campo [b:865bb008ac]varchar[/b:865bb008ac], vc poderia fazer assim:
var b: String; begin with Table1 do try While Not Eof Do begin Edit; b:= FieldByName(´OldData´).AsString; FieldByName(´NewData´).AsString := (Copy(b,7,2)+´/´+Copy(b,5,2)+´/´+Copy(b,1,4)); Post; next; end; finally Refresh; First; end; end;
Espero q possa lhe ser útil!!!
Martins
Gostei + 0
27/09/2005
Dberlese
var b: String; begin with Table1 do try While Not Eof Do begin Edit; b:= FieldByName(´OldData´).AsString; FieldByName(´NewData´).AsString := (Copy(b,7,2)+´/´+Copy(b,5,2)+´/´+Copy(b,1,4)); Post; next; end; finally Refresh; First; end; end;
Era realmente oq eu estava precisando, funcionou perfeitamente, Muito Obrigado!!!
Danilo
Gostei + 0
27/09/2005
Martins
var b: String; begin with Table1 do try While Not Eof Do begin Edit; b:= FieldByName(´OldData´).AsString; FieldByName(´NewData´).AsString := (Copy(b,7,2)+´/´+Copy(b,5,2)+´/´+Copy(b,1,4)); Post; next; end; finally Refresh; First; end; end;
[b:a930d4b08d]Danilo[/b:a930d4b08d], disponha, estamos aqui para tentar ajudar os colegas, se estiver ao nosso alcance, tentaremos contribuir.
Boa Sorte!!!!
Gostei + 0
27/09/2005
Rjun
UPDATE Tabeta SET Campo = SUBSTRING(Campo FROM 7 FOR 2) + SUBSTRING(Campo FROM 5 FOR 2) + SUBSTRING(Campo FROM 1 FOR 4)
Gostei + 0
27/09/2005
Martins
UPDATE Tabeta SET Campo = SUBSTRING(Campo FROM 7 FOR 2) + SUBSTRING(Campo FROM 5 FOR 2) + SUBSTRING(Campo FROM 1 FOR 4)
Interessante, vou testar essa instrução!
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)