awslabs / amazon-kinesis-data-generator

A UI that simplifies testing with Amazon Kinesis Streams and Firehose. Create and save record templates, and easily send data to Amazon Kinesis.
Apache License 2.0
200 stars 76 forks source link

Using between, or adding a random number of X time to a date #22

Open electronicalias opened 4 years ago

electronicalias commented 4 years ago

I have multiple timestamps in the streamed record I'm trying to reproduce. Each one has a start and end date. I'm trying to randomise the end date by adding a random number of milliseconds to the start date.

I get the start date from {{date.utc}} and I can see there is a function for date.between() - however it's not clear how you would use this. I'm stuck on how to get the current date into the function:

{{date.between(<current_date>,<num_of_milliseconds>)}} doesn't work and neither have any of my other guesses. Any help on how to format this would be appreciated.