Wednesday, August 14, 2013

Google Data API Setup (2.1.0)

To pull all the profile ids for all the accounts from google analytics, we need to install the following .msi file in our local system or server where we are going to execute the process.

The setup name is: Google_Data_API_Setup_2.1.0.0.msi


Once we install the setup file, go to the following path - C:\Program Files (x86)\Google\Google Data API SDK\Redist and copy the all .dll file and paste/move in to the assembly folder (Type as Run in search option - type as Assembly)


Tuesday, August 13, 2013

How to convert Integer value to Time in sql server

Declare @T int

set @T = 10455836

select (@T / 1000000) % 100 as hour,
       (@T / 10000) % 100 as minute,
       (@T / 100) % 100 as second,
       (@T % 100) * 10 as millisecond

select dateadd(hour, (@T / 1000000) % 100,
       dateadd(minute, (@T / 10000) % 100,
       dateadd(second, (@T / 100) % 100,
       dateadd(millisecond, (@T % 100) * 10, cast('00:00:00' as time(2))))))