Quantcast
Channel: Mockaroo Community Forum - Latest posts
Viewing all 2648 articles
Browse latest View live

How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

$
0
0

I'm doing a schema that includes 240 records with each record having a timestamp. How can I have the last record be the current time with each previous record 3 minutes apart? Can the date also be today, instead to selecting a actual date?


How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

$
0
0

@mp_np , thanks for the suggestion. I wasn't able to get it to work doing that; do you happen to have an example schema?

How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

$
0
0

Hi @eddie_nunezt try https://www.mockaroo.com/f0f93f40 - I've set it to 100 so you can view it working in the preview, but just replace 100 with 240 in your example.

You need to scroll down to the bottom to check after you've run preview as you wanted the last to be now, and each previous 3 minutes earlier.

How to date entry with additional condition

$
0
0

Hi @shiv

  1. create Custom List with your status codes, named status
  2. create hidden date field for each random date you want to generate, named _dategen
  3. set entry date or expiry date as formula and enter the following formula:
    case status when *['HB','ZZ'] then __date_gen else '' end

see example at https://www.mockaroo.com/14abaf70

Need help with below query

How to extract just the date part after adding some days to now()

How to extract just the date part after adding some days to now()

$
0
0

Excellent, thanks, just what I needed


How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

$
0
0

@mp_np , now I'm realizing why you mentioned "assuming you have default row as 'id row number'". It works well the way you used it, however, I'm working with a json object with an array that will include a UTC timestamp and value. I don't use "id" anywhere in my json formatting. Is there a way to do it in the "timestamp" for every item in my custom list as I have it here: https://mockaroo.com/schemas/109114 ?

How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

$
0
0

Hi @eddie_nunezt. To share a schema, you need to use the Share link which is below the download and preview buttons. Schemas under your own login look like this: https://www.mockaroo.com/schemas/108856
and can't be accessed by others unless you share the project with them. Share links look like: https://www.mockaroo.com/f0f93f40

However, I have modified my example to use a hidden row number field. Simply use 2 x underscore (_) in front of a field name and that field is hidden from view in the mock data, though you can use it in formulae.

So the row number field becomes:
__id
Note, you could call this __row_number for clarity in your own project

and the formula becomes:
now().utc-minutes((100-__id)*3)
(replacing __id with __row_number if you change the name)
Here is an example that may work for you: https://www.mockaroo.com/492c9f30

Minutes & Seconds functions

$
0
0

Hello
Can you please show me how to use hours & minutes & seconds function
I need to extract these information from a date
Similar to year / month / day
Thx

Minutes & Seconds functions

Is there a way to pick profile images from sites like uifaces.com?

Is there a way to pick profile images from sites like uifaces.com?

$
0
0

This site has users with simple image urls - https://randomuser.me/photos
by converting the gender to 'men' or 'women' and adding a random number generator from 1-99 I've got an image URL. You may need to experiment as the highest I found for men was 91, and the highest for women was 94.

https://www.mockaroo.com/b34a2f30

They also have lego 1-8

Alternatively if you can download the mock data from one of the other sites, you can add as a dataset.

Concatenate string and GUID

$
0
0

Trying to figure out if I can concatenate a string and a GUID. Is there a way to use a guid in a formula?

Thanks,
Shay


Generate an ISODate value without the quote

$
0
0

How can I generate a template or function the returns a value like the sample below..

{"id":1,
"first_name":"Yanaton",
"last_name":"Kees",
"IsoDate": ISODate('2018-04-22T12:52:33.336Z')
}

NOTE: ISODate value not in quote.

Thanks!

Generate a JSON value

$
0
0

How do I generate a JSON value like below

{
"id":1,
"name": {
"full_name" : "Kees, Yanaton", // Mockaroo generated value using function/formula
"first_name" : "Yanaton", // Mockaroo generated value using function/formula
"last_name":"Kees" // Mockaroo generated value using function/formula
}
}

Thanks!

Generate an ISODate value without the quote

$
0
0

My bad - there is a MongoDB ISO function

How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

$
0
0

@mp_np , perhaps I'm not setting up my json arrays correctly? I have the parent object names "dataTypes" that only appears once, in that object I have a list that displays the value and timestamp. If you press "preview", this is exactly how I would like it to appear for the exception of the timestamp not doing what I would want it to do. Is there a way to add that formula using this schema I've created?

https://mockaroo.com/7c218440

How to have timestamp using UTC with each timestamp 3 minutes apart with the latest being the current time?

Viewing all 2648 articles
Browse latest View live