Hi,
Is there any way to get the startup time of a session?
Assuming you are under MS Windows:
MESSAGE System.Diagnostics.Process:GetCurrentProcess():StartTime
VIEW-AS ALERT-BOX INFO BUTTONS OK.
Yes. It's in the _Connect table, column _Connect-time.
_MyConnection is a link to the _Connect of the current session if that's of any use.
You're right it's connect time to the database, so has to be taken with a pinch of salt.
Assuming you are under MS Windows:
MESSAGE System.Diagnostics.Process:GetCurrentProcess():StartTime
VIEW-AS ALERT-BOX INFO BUTTONS OK.
Thanks for the suggestions guys.
I think I can use the ETIME solution, although I can never be 100% sure no one has reset it before (by convention here, we should never reset it, so it should be safe).
I need a solution that works both on Unix and Windows (AppServer), so I might get away with the Olivier's suggestion using conditional compilation on Windows.
I could also store the NOW value in a globally available property at session startup, but I would rather use some built-in attribute. Something like SESSION:START-TIME would have been great indeed Brian.
I'll log it as (yet another) Idea.
You probably want to have the SESSION:STARTUP as a datetime type, right?
Patrick, I would go all the way and make it a DATETIME-TZ data type (just cause we can & you just know someone down the road will care about the timezone <smile>).
Yes, of course! I hardly ever use TZ fields but you are absolutely correct; TZ it should be!