DateTime2ELTime_s (DateTime) VS Time_s
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: DateTime2ELTime_s (DateTime) VS Time_s
`Time_s` returns the time of the specified bar in HHmmss format. For example, 9:54:34 will be returned as 95434.
`DateTime2ELTime_s()` converts a DateTime format (which is a number that includes both the date and time) to PowerLanguage's HHmmss format.
For example:
* `ComputerDateTime` returns the DateTime of the computer.
* To get the current computer time in PowerLanguage PowerLanguage's HHmmss format, use `DateTime2ELTime_s(ComputerDateTime)`.
Why is DateTime needed?
When performing calculations PowerLanguage's HHmmss will first need to be transformed to DateTime, otherwise you'd get faulty results. For example, subtracting 6 hours (60000) from 2:30:31 (HHmmss format of 23031) gives -36969, which is not a real time.
`DateTime2ELTime_s()` converts a DateTime format (which is a number that includes both the date and time) to PowerLanguage's HHmmss format.
For example:
* `ComputerDateTime` returns the DateTime of the computer.
* To get the current computer time in PowerLanguage PowerLanguage's HHmmss format, use `DateTime2ELTime_s(ComputerDateTime)`.
Why is DateTime needed?
When performing calculations PowerLanguage's HHmmss will first need to be transformed to DateTime, otherwise you'd get faulty results. For example, subtracting 6 hours (60000) from 2:30:31 (HHmmss format of 23031) gives -36969, which is not a real time.