Dates as a UOM?!

View previous topic View next topic Go down

Dates as a UOM?!

Post  simmo2013 on Tue Nov 05, 2013 2:27 pm

Hi,

So I have a different requirement (well different to me!). The customer sells products through a website all over the world. The website DB is hosted in the UK and the datetime stamp of a sale is a UK date/time. However they want to be able to slice the data by the local date. I am not 100% sure how to model this. Initially I thought just have a second date called Local Date that links to the date table and I calculate that local date in the ETL. However I am now wondering if anyone has ever done this and done this in a different way?

Any comments valued!

Thanks

Simmo

simmo2013

Posts : 6
Join date : 2013-11-05

View user profile

Back to top Go down

Re: Dates as a UOM?!

Post  hkandpal on Wed Nov 06, 2013 10:19 pm

Hi,

if the local time that you are storing is with time on which the transaction was done then the best option is to store the time in a localdate/time column and also have the time captured in a GMT/UTC time in a different column.



thanks

hkandpal

Posts : 113
Join date : 2010-08-16

View user profile

Back to top Go down

Re: Dates as a UOM?!

Post  simmo2013 on Thu Nov 07, 2013 6:13 am

Thanks for that. However the column is stored in a UK datetime field as that is where the server is. For US facts my users want to be able to look at the datetime at say EST. I am thinking I store two dates the UK date (which a lot of reporting is still done from) AND the local date (I can calculate that by another attribute) and calculate that using standard calcs...

simmo2013

Posts : 6
Join date : 2013-11-05

View user profile

Back to top Go down

Re: Dates as a UOM?!

Post  ngalemmo on Thu Nov 07, 2013 1:01 pm

I think you are both saying the same thing. As hkandpal suggested, you store both a local time and a standard time. General practice is to store the standard time as UTC (aka GMT or Zulu) time. It has no bearing on where the server is. The local UK time should be GMT, but I do not know if they implement daylight saving time. UTC is basically standard GMT without political manipulation... in other words, no clock changes during the year.
avatar
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

View user profile http://aginity.com

Back to top Go down

Re: Dates as a UOM?!

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum