Does anyone know how to get and use the system date/time (the local computer's date/time and not a UTC value) in a table's triggered actions, and then use it? I have a table that logs activity from other tables and need to be able to log the user's local system date/time upon insert. The function SysDateTime() isn't available in a table's formula field and I'm not sure how/if I can use SysDateTime() to populate a date/time field in the table upon insert.
In the Activity table's Upon Insert trigger, it would be something like a date/time field: Created_Local=SysDateTime() in the trigger's Set section (Update #inserted). I need to store both the local system date AND the time in this field.
I can't use a UTC date (the normal TimeStamp method) because my users are all over the globe and the date/time wouldn't make sense to them without calculations. I need to use the local computer's system date.
I also don't want to have to create a new field in each table that does an 'Insert Into' the Activity table upon their own Insert Data as there are many of these tables and I'd have to put the local system date/time field in a lot of submission pages (to be able to use SysDateTime() since it's not available in a formula field). So to me the simplest solution is to somehow update Activity table's field "Created_Local" with SysDateTime() upon insert of new data. Any help would be greatly appreciated!
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
DesiLogi
Hello,
Does anyone know how to get and use the system date/time (the local computer's date/time and not a UTC value) in a table's triggered actions, and then use it? I have a table that logs activity from other tables and need to be able to log the user's local system date/time upon insert. The function SysDateTime() isn't available in a table's formula field and I'm not sure how/if I can use SysDateTime() to populate a date/time field in the table upon insert.
In the Activity table's Upon Insert trigger, it would be something like a date/time field: Created_Local=SysDateTime() in the trigger's Set section (Update #inserted). I need to store both the local system date AND the time in this field.
I can't use a UTC date (the normal TimeStamp method) because my users are all over the globe and the date/time wouldn't make sense to them without calculations. I need to use the local computer's system date.
I also don't want to have to create a new field in each table that does an 'Insert Into' the Activity table upon their own Insert Data as there are many of these tables and I'd have to put the local system date/time field in a lot of submission pages (to be able to use SysDateTime() since it's not available in a formula field). So to me the simplest solution is to somehow update Activity table's field "Created_Local" with SysDateTime() upon insert of new data. Any help would be greatly appreciated!
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.