The pjs.timestamp() API converts an expression to a timestamp, or returns the current date & time as a timestamp if no parameters are passed to it.
- Field or expression (optional)
- Format or Fractional seconds (optional) - format can be *iso or *iso0
- Fractional seconds (optional)
A timestamp value
What's the difference between *iso and *iso0?
*iso is the default timestamp format. *iso0 is for indicating there are no separators in the timestamp.
If you need to convert a string with a date value in it, you need to use this in conjunction with pjs.toDate(). Below is an example: