Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to extract time from a timestamp

How to extract time from a timestamp

How to extract time from a timestamp

I'm been handed over responsibility for our FM databases. The boss used a timestamp to track the creation of our tech issues. Now the tech manager wants a report of what hours are busiest during a certain time range.

I've tried to use GetAsTime to extract the time from the timestamp but I get "17531664:00:00" instead of "8:30:56 AM". Is there a way to get just the time or to get it formatted correctly?

Thanks for your help.

RE: How to extract time from a timestamp

The GetAsTime() functioin should give you the right time value.

Check if the involved fields are formatted as they should.

F.i. if the function result field is formatted as number, you will have a number...

RE: How to extract time from a timestamp

I finally figured out the problem. The timestamp field had gotten changed from timestamp to date and, even though the time was visible in the field, technically the date type doesn't have a time. Thus, it ignored it and always returned 12:00:00 a.m. (in that long number format) when I used the GetAsTime. I put the field back to a timestamp and now it extracts beautifully.

RE: How to extract time from a timestamp

So it was a formatproblem after all... smile

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close