Getting Data In

Convert BST to America/NY (Timezone)

Vidi
Engager

I tried this but seems this is not working.

I want to convert BST to America /NY time please.

| eval BST=strftime(TransactTime/1000000000, "%d/%m/%y %H:%M:%S %Z" )
| eval TimeZone=BST+" -EST"
| eval ET=strftime(strptime(TimeZone,"%d/%m/%y %H:%M:%S %Z"),"%d/%m/%y %H:%M:%S %Z")
| table BST, ET

Labels (2)
0 Karma

to4kawa
Ultra Champion
| makeresults
| eval h_time=strftime(_time,"%FT%T")
| eval est_time=strptime(h_time."-0500","%FT%T%z")
| convert ctime(est_time)

Vidi
Engager

I tried this it didn't work.

First of all it complained about the format of strftime so I changed it to

| eval BST=strftime(TransactTime/1000000000, "%d/%m/%y %H:%M:%S %Z" )
| eval NY=strptime(BST."-0500","%d/%m/%y %H:%M:%S %Z")
| convert ctime(BST)

| table host, BST, NY, TransactTime

Tags (1)
0 Karma

to4kawa
Ultra Champion
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...