sysdate

20 views
Skip to first unread message

Mauro Rozenberg

unread,
Jan 14, 2011, 2:57:42 PM1/14/11
to AIMMS - The Modeling System
Hello all.
I can't figure out how to save in a parameter the present date and
time. I'd like to do this so that I can control when the execution
starts and finishes.
After saving it in a parameter it is passed to an oracle DB.

Thanks,
Mauro.

Sergio Bruno

unread,
Jan 14, 2011, 3:27:49 PM1/14/11
to ai...@googlegroups.com
Mauro,

since you can be sure that local computers will be at the same time as
your Oracle Database (and between themselves), the best approach would
be to use the date and time from your server.
How to do this?
use the DirectSQL function from AIMMS, inserting in the desired field
of your database the timestamp in your server

(ex: insert into table_time (time_field) values getdate() ) for SQL server of
(ex: insert into table_time (time_field) values sysdate) for Oracle

then, read back the date time you wrote on your table to a string parameter.

this way you are sure that all time references are normallized to your
database server time.

best,
Sergio

> --
> You received this message because you are subscribed to the Google Groups "AIMMS - The Modeling System" group.
> To post to this group, send email to ai...@googlegroups.com.
> To unsubscribe from this group, send email to aimms+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/aimms?hl=en.
>
>

Sergio Bruno

unread,
Jan 14, 2011, 3:28:19 PM1/14/11
to ai...@googlegroups.com
I mean, since you can't be sure
Reply all
Reply to author
Forward
0 new messages