<p>This depends on the slot length which can be changed. You can't be certain about a slot number for sometime that is a long time in the future.</p>
<p>If you assume you know the slot config then you can use
<a href="https://github.com/input-output-hk/plutus-apps/blob/d637b1916522e4ec20b719487a8a2e066937aceb/plutus-ledger/src/Ledger/TimeSlot.hs#L130" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-apps/blob/d637b1916522e4ec20b719487a8a2e066937aceb/plutus-ledger/src/Ledger/TimeSlot.hs#L130</a></p>

CC BY-SA 4.0
2022-03-10T16:23:09.990Z
2022-03-10T16:23:09.990Z
waalge
<p>I would like to know how to calculate the slot time for a particular date(e.g. 1/1/2023).</p>

CC BY-SA 4.0
2022-03-11T18:30:07.413Z
Please, check this: https://cardano.stackexchange.com/questions/7034/how-to-convert-posixtime-to-slot-number-on-cardano-testnet/7035#7035
kindofdev
<slottime>
How to calculate the slot time of a given date?
# How to calculate the slot time of a given date?

(Asked by: username_0 on 2022-03-10)

I would like to know how to calculate the slot time for a particular date(e.g. 1/1/2023).

**Tags:** slottime
> **Comments:**
> **username_1**: Please, check this: https://cardano.stackexchange.com/questions/7034/how-to-convert-posixtime-to-slot-number-on-cardano-testnet/7035#7035  

---

## 1 answers

### Answer by username_2 on 2022-03-10. Score: 1

This depends on the slot length which can be changed. You can't be certain about a slot number for sometime that is a long time in the future.

If you assume you know the slot config then you can use
<https://github.com/input-output-hk/plutus-apps/blob/d637b1916522e4ec20b719487a8a2e066937aceb/plutus-ledger/src/Ledger/TimeSlot.hs#L130>


---

