Help with Ticks to time conversion

Hi All

I am facing a quite weird issue in the sense that there’s an API service which gives me time in terms of unix ticks in millisecond and I need to convert it to time.Time. There lies the problem in that time.Unix() in Go takes second or nanosecond parameters and not millisecond. So how do I convert this millisecond ticks to nanosecond one and or second one and use it as a parameter to the function.
I did try division by 10^6 which would make it 10^9 but that gave an invalid time conversion on printing.
Any help would b appreciated.

Could you please show some code of what you have tried and what the exact error message is?

Look here is an example close to your problem.

1 Like

Hey thanks bro… I was looking for something similar. This should solve my problem. @geosoft1

Thanks for responding. It’s similar to what he has said.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.