Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9173591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:36:48+00:00 2026-06-17T16:36:48+00:00

I need to get timestamps from Axapta-tables in TSQL , without timezone and /

  • 0

I need to get timestamps from Axapta-tables in TSQL, without timezone and / or daylight-bias-offsets for each time, eg from table JMGABSENCECALENDAR.

Taking this as initial approach, and regaring this, it works for current time. But reading data from the table referring to other timestamps, the solution provided in the second link doesn’t get the information about daylight to the specified time.

For example:

I add an absence for today ( 2012-01-07 ).
Now, using SSMS, reading this dataset leads to

starttime = 2013-01-06 23:00:00.000
and endtime = 2013-01-07 23:00:00.000

That’s ok, and I can use

DECLARE @UTCOffset SMALLINT

EXEC master..xp_regread
    'HKEY_LOCAL_MACHINE',
    'SYSTEM\CurrentControlSet\Control\TimeZoneInformation',
    'ActiveTimeBias',
    @UTCOffset OUTPUT

SELECT DATEADD(MINUTE, @UTCOffset, GETDATE()) AS UTCTime 

to remove offset. This works fine on actual dates, but what’s the right way to remove offset for past or future times, eg 2012-07-01 ?

Here, the offset is 120 minutes, because of summertime. Reading Reg-Value only returns current offset.

The task has to be solved in TSQL 2008.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:36:48+00:00Added an answer on June 17, 2026 at 4:36 pm

    I had a same problem, but it was in a complete different setting. I had nothing to do with axapta.
    However, i had the problem that i had to know the UTC offset of different times. The tricky part here is the fact that different countries use a different approach towards daylight saving times, and therefor a difference in the offset may occur for different countries at the same time.

    What i did was to create a lookup table where i put in the dates that UTC offsets change, these are known dates. I gave it an offset column so i could easily look up the offset that i needed for a certain date, using the between operator.

    It worked for me, maybe this solution can provide you something?

    Ps. You don’t have to lookup the UTC date offset from out of the registry. Using the function getutcdate() will give you the same 😉 Using that inside a DATADD makes it a little more readable 😉

    Have fun and i hope i could contribute to your problem…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I need to get N numbers from range between 2 big numbers, without
I need to get three fields from a table. The table has the fields
I'm trying to get the values from timestamps created in a lookup table. Let's
I have two tables with a weak relation. I need get a text value
Possible Duplicate: php get microtime from date string For a specific purpose, I need
I have a table with some foreign keys, I need to get a report
I have a Unix timestamp that I need to get the individual year, month,
I need get the id of an images which is place inside a datatemplate..
Just need get some vals located in application.ini(main ini) in the Controller plugin I
I need get all items these have no categories int? categoryId = null; var

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.