
To get the todays records I am using the query
year(TimeStamp) eq 2020 and month(TimeStamp) eq 1 and day(TimeStamp) eq 28
I am getting all the records created on that day.
I have hardcoded it, but how to get it dynamically with out hardcoding...?
i.e. how to get year
i.e. how to get current month number
i.e. how to get day number
Hi
You can use expressions:
utcNow() will provide you curent timestamp. Its predefined format is yyyy-MM-ddTHH:mm:ss:fffffffK
Once you get it, you can split by using character '-' as a separator
Let's assume you store utcNow() result in a string variable called 'currentDateTime'.
IN order to get current year, you can apply the following expression: split(variables('currentDateTime'),'-')[0]
IN order to get current month, you can apply the following expression: split(variables('currentDateTime'),'-')[1]
IN order to get current day of month, you can apply the following expression: split(variables('currentDateTime'),'-')[2]
Hope this helps