Skip to content

Instantly share code, notes, and snippets.

@agoulziprod
Last active October 20, 2020 08:59
Show Gist options
  • Save agoulziprod/19746629eb32a47aa1adec4278dbba8c to your computer and use it in GitHub Desktop.
Save agoulziprod/19746629eb32a47aa1adec4278dbba8c to your computer and use it in GitHub Desktop.
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])
Else
$day:=0
End if
If ($dateCol.length>2)
$year:=Num($dateCol[2])
Else
$year:=0
End if
$date:=Add to date(!00-00-00!;$year;$month;$day)
$record.date_inclusion:=$date
@agoulziprod
Copy link
Author

convert a string "8/20/65" to a date => m/d/y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment