- Joined
- May 11, 2025
- Messages
- 8
- Reaction score
- 2
Hello, I am trying to Log in a Call Flow Application the current time. The only function I can find is the NOW function. But it doesn't log in a consistent way.
eg DD/MM/YYYY HH:MM:SS AM/PM or if the day and time is different D/M/YYYY H:M:S AM/PM
For the purposes of my script i tried using functions to manipulate this data given by the NOW function to DDMMYYHHMMSS consistently. Meaning that January will read as 01, and December as 12. And time will be in 24 hour time.
II tried using LEFT and RIGHT functions but due to the inconsistency of the length of NOW function this is not possible.
I got to the point where I was able to extract just the time, and run a function that looked for PM and if TRUE added 1200000. But that only works if I only look at time and not date.
I then tried to use an HTTP request to pull from a time date website API. This works. Intermitently. Sometimes 3cx CFA would fail to connect to the API and then would close the app and therefore drop a call.
So now I'm back to trying the NOW function...
What's frustrating is that in the 3cx CallFlowLog the log time stamps are exactly what I want to work with. In the correct format. But the NOW function is worthless. See below.
2025/05/10 16:25:28.076|0015|Trac| [_3CX.Script] _910_129.Main.15069.[C:3019.4]-NOWlog - CallFlow.CFD.LoggerComponent 'NOWlog' - 5/10/2025 4:25:28 PM
Thank you for any help you may have regarding this.
eg DD/MM/YYYY HH:MM:SS AM/PM or if the day and time is different D/M/YYYY H:M:S AM/PM
For the purposes of my script i tried using functions to manipulate this data given by the NOW function to DDMMYYHHMMSS consistently. Meaning that January will read as 01, and December as 12. And time will be in 24 hour time.
II tried using LEFT and RIGHT functions but due to the inconsistency of the length of NOW function this is not possible.
I got to the point where I was able to extract just the time, and run a function that looked for PM and if TRUE added 1200000. But that only works if I only look at time and not date.
I then tried to use an HTTP request to pull from a time date website API. This works. Intermitently. Sometimes 3cx CFA would fail to connect to the API and then would close the app and therefore drop a call.
So now I'm back to trying the NOW function...
What's frustrating is that in the 3cx CallFlowLog the log time stamps are exactly what I want to work with. In the correct format. But the NOW function is worthless. See below.
2025/05/10 16:25:28.076|0015|Trac| [_3CX.Script] _910_129.Main.15069.[C:3019.4]-NOWlog - CallFlow.CFD.LoggerComponent 'NOWlog' - 5/10/2025 4:25:28 PM
Thank you for any help you may have regarding this.