Unable to send Date in dd MMM yyyy format as a field from telegraf to Influx

Hello Everyone, I want to send a date with the format e.g. 30 May 2021 as a field from telegraf to Influxdb. I am using Powershell script to create this date value and send the same to Influxdb. My commands looks as below
$ sysLastBootTime = $userSystem.ConvertToDateTime($userSystem.LastBootUpTime).tostring("dd/MM/yyyy") write-host "Windows_rebootpending,host=$($ComputerName.ToString()) Days=$($sysuptime.Days.ToString()),LastBootTime=$($ sysLastBootTime ) $($date)" If I format the date to ddMMyyyy its being sent else dd MM yyyy or dd MMM yyyy or dd/MM/yyyy results in no metrics sent. Could someone suggest or help on this to make work.

If you are creating this date in a Powershell script, in order to send it to
InfluxDB, and you find that the format ddMMyyyy works, why not just use that?

What is so special to you about creating a date in a format that InfluxDB
doesn’t like, that you want to spend time trying to get it to accept it? Why
not just go with the format InfluxDB is happy with?


Thanks for having a look. I need to show up the date in a single column in DD.MM.YYYY or ddMMMyyyy format in grafana dashboard.

In that case I suggest sending it to telegraf / InfluxDB as an Epoch timestamp
and let Grafana do the formatting.

I assume Windows Powershell knows how to do Epoch timestamps?


I tried it but could see no valid unit for formatting epoch values in field formatting options. I am not sure if field can format epoch valuee