cancel
Showing results for 
Search instead for 
Did you mean: 

Datenow function shows different time values

Former Member
0 Kudos

Hi all,

I just have experienced the following problem. I am using the MII datenow function (MII 12.0.2) on a server. When using the Link Editor inside the Workbench to evaluate the datenow value, it shows the current time correctly. However, when I use the same value as a parameter to a query and pass it to a varchar field in the database (Oracle 10g), the hour is one less than current time.

For example, if the link editor evaluates 2008-10-10T14:32:33, the table field contains 2008-10-10T13:32:33 after insert.

What is happening to the value

- when it is evaluated in the workbench

- passed to a query as text and inserted to a text field?

Using a date field instead of varchar and TO_DATE function shows the same result.

Michael

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Michael,

this looks like a summer saving time problem. I could imagine that the workbench which is executed locally on your computer is one hour

ahaed the server time. So please check your local computers time and the MII / DB servers time.

Regards,

Matthias

Former Member
0 Kudos

Hi Matthias,

it is correct that my local PC time is UTC2 (MESZ), and the server time is UTC1.

What makes me wonder is the fact that the value inside the workbench differs from what is used to insert into the table, because usually I can rely on the fact that the same value that I checked in the workbench is used to maintain table data.

I find this behavious confusing, because I must remember to manually correct the hour value (e.g. using the dateaddhours function).

Michael

Former Member
0 Kudos

Hi Michael,

remember that datenow evaluation in the link editor is done locally and not on the server. Then the local time is used. Whereas the execution on the server side uses the server time. You are right, this is somehow misleading, but I think there is no way around.

Regards,

Matthias

Answers (0)