Skip to content

Instantly share code, notes, and snippets.

@viniciusgati
Created August 31, 2017 01:10
Show Gist options
  • Save viniciusgati/d5cd39f005b532ef89aa685a25d0c573 to your computer and use it in GitHub Desktop.
Save viniciusgati/d5cd39f005b532ef89aa685a25d0c573 to your computer and use it in GitHub Desktop.
Local aRem := {(CHR(13)+ CHR(10)), CHR(13), CHR(10), CHR(9), CHR(11)}
Local var := 0
for var:= 1 to Len(aRem)
cStr := STRTRAN( cStr, aRem[var], "\n" )
next
cStr := LTRIM(cStr)
Static Function FS_DtoJS(dDate)
Local cData := nil
Local cDataOk := ""
if VALTYPE(dDate) == "D"
cData := DTOS(dDate)
cDataOk += RIGHT(cData, 2) + "/"
cDataOk += RIGHT( LEFT(cData,6) , 2) + "/"
cDataOk += LEFT(cData, 4)
else
Return "null"
endIf
Return cDataOk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment