Author |
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: December 09 2008 at 17:21 | IP Logged
|
|
|
Not sure if this is really a bug (since it has no effect on my operation).
When executing the following formula (to convert 24 hr time to 12 hour time); I DO get the desired output text, but I see that I DO generate a formula log error also.
Formula:
string(if(hour(today())>12, hour(today())-12 + ";"+ mid(string(now()),4,2)+" PM", hour(today())+ ";" + mid(string(now()),4,2) + " AM"))
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 09 2008 at 20:55 | IP Logged
|
|
|
I don't see an entry in the log with that.
Which version of PH are you running?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 09 2008 at 22:02 | IP Logged
|
|
|
Smarty,
Not sure why it would give you an error except that you're using the today() function in a couple places when you're probably better off using the now() function.
However, you may find this formula simpler...
string(now(),"hh:mm:ss am/pm")
Tony,
Check your eventlog settings in the Setup section. There is a new log entry that probably is not default checked when you upgraded that will log an error anytime a formula evaluates with a syntax error.
Hope this helps,
Dave.
|
Back to Top |
|
|