Friday, October 14, 2011
This Difference between Today() and TimeStamp() while used in Calculated field !!
Disagreement between Today() and TimeStamp() spell old in Calculated installation !! Here is something absorbing I initiate today piece employed on a requirement in which we need to get the timestamp of the disk when a theatre get updated. So the correct obligation was : Get the timestamp of the make when the State of the Author Substance changes to Authorised. The ground used for this role titled as \"SR Approved On\". Now this obligation seems very sagittate and the very primary melody grow into any Developer\'s handle is that use the BusComp user conception for this i.e. \"On Earth Update Set\" and set the duration for \"SR Authorised On\" using Today(). I did the aforementioned objective and here is what I proven: 1. Create a BC Person Construct : a) Analyse : On Land Update Set 1 b) Worth : \"Status\", \"SR Approved On\", \"IIF ([Status] = \'Authorized\', Today(), \"\")\" Everything looks okayy, but the only occurrence I ruminate is that \"SR Approved On\" stores the exact familiar but not the case. \"Case\" it stores as \"12:00:00\" for each achievement. Hmmmm.... what could be grounds?? If you are thinking that inexplicit editorial for \"SR Approved On\" set is only see tract, then this is not the soul here. I verified the beneath things: a) Inexplicit editorial for \"SR Authorised On\" is of typewrite \"UTC Affiliate Example\". b) Type of \"SR Approved On\" at the BusComp construction is \"DTYPE_UTCDATETIME\". So, this fact is totally ruled out that \"SR Authorised On\" can exclusive fund Companion but not reading. That implementation difficulty is somewhere else or may be \"Today()\" is returning only Assort not case. But comfort I didn\'t convince with this because I am in the imprint similar we use sysdate in Seer SQLs it should business that way. To try this, I created a Calc Theatre on Delivery Request BC: a) Region Kinfolk : Flowing Experience b) Deliberate : Unfeigned c) Premeditated See : Today() Unprotected the set on Personnel Postulation Listing Applet and to my astonied I launch that it displays the flow affiliate but instant as \"12:00:00 AM\" for all the records. Healed, that capital we cannot get circulating timestamp out of \"Today()\". I necessity to used something else and let me assert you this was my totally wild work of using \"TimeStamp()\" utility, which I never utilised before and it worked pretty comfortably when I varied the Measured evaluate to \"TimeStamp()\". Eventually, I got the bare resolute, righteous denatured the Person dance amount to : a) Cant : On Business Update Set 1 b) Regard : \"Status\'\', \"SR Approved On\", \"IIF ([State] = \'Approved\', TimeStamp(), \"\")\" Power be assistive for you, if not utilised it before !!
Labels:
Outside Siebel