hi, I´m new with coldfusion…

is there any way to insert in a datable (oracle) a timestamp?

something like “1083240925379”

thanks

hi, I´m new with coldfusion…

is there any way to insert in a datable (oracle) a timestamp?

something like “1083240925379”

thanks

you can always do a timestamp with the now() function, and to format it specifically for oracle you can use the createodbcdatetime(now()) function like so.

what you seem to be referencing is something like a tickcount (gettickcount()) which is the number of seconds since the last server restart, or something like the php function that gives the number of seconds since the last epoch (i cant remember what that function is off the top of my head, nor do i really know what an epoch is) in which case i dont know of a cf function to do this. if you have specific needs, with a little work you could create your own user defined function to do exactly what you need, and all it takes is a little work, but less code in the long run.

hope this helps, let me know if i can clarify anything.

hi,

I´m using oracle with cfm

at the moment I found this way:

```
insert ... sysdate - to_date('01011970','DDMMYYYY') ) * 24 * 60 * 60)
```

I´ve seen that what you told me about

```
gettickcount()
```

works correctly too, but numbers are negative

I need these numbers to calculate times

thanks for your help

negative numbers are still differences between two…

you can use the abs() function to return the absolute value.

for instance 10000000 - 10000008 = -8, but its still a difference of 8 seconds.

abs(-8) = 8

does that help?

yes, gettickcount() helps me

thanks very much for your help