Skip to content

Instantly share code, notes, and snippets.

View agoulziprod's full-sized avatar
💭
JS Developer - Digital artist

AGOULZI mohamed agoulziprod

💭
JS Developer - Digital artist
View GitHub Profile
@agoulziprod
agoulziprod / floating_values.4dm
Last active October 20, 2020 09:01
fixing floating values errors, 12.299995 =>12.3, or 12.360000125 to 12.36
$dc:=ds.DonneeClinique.all()
For each ($donnee;$dc)
$text:=String($donnee.poids_kg)
If ($text#"")
$numbers:=Split string($text;".")
If ($numbers.length=2)
$E:=$numbers[0]
$flotante:=$numbers[1]
@agoulziprod
agoulziprod / add_a_date.4dm
Last active October 20, 2020 08:59
convert a string "8/20/65" to a date => m/d/y
$dateCol:=Split string($item["Date Inclusion"];"/")
//8/20/65
If ($dateCol.length>0)
$month:=Num($dateCol[0])
Else
$month:=0
End if
If ($dateCol.length>1)
$day:=Num($dateCol[1])