Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Postprocess: duration #39

Open
rhuille opened this issue Oct 1, 2019 · 1 comment
Open

Postprocess: duration #39

rhuille opened this issue Oct 1, 2019 · 1 comment

Comments

@rhuille
Copy link
Contributor

rhuille commented Oct 1, 2019

--> je peux choisir le format

question: à integrer dans le postprocess formula ?

@ElodieCoudry
Copy link

ElodieCoudry commented Oct 1, 2019

postprocess: [
  {
    convert_str_to_datetime:
      column: "Echeance"
      format: "%d/%m/%Y"
  }
  {
    cast:
      column: "Echeance"
      new_column: "ms_since_1970"
      type: "int64"
  }
  {
    formula:
      new_column: "diff_in_millisecond"
      formula: "ms_since_1970/1000000 - <%= new Date().getTime() %> "
  }
  {
    formula:
      new_column: "diff_in_days"
      formula: "diff_in_millisecond/1000/3600/24+0.5"
  }
]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants