Category Archives: Uncategorized

Comparing a UTC Date With a Local Date

I tried several things on the web and found they didn’t work on our Azure database. This is what I came to. When you do a GETDATE() or GETUTCDATE() on Azure, it comes back as the same date. You have to include your local timezone calculation into the the mix to make it work

Here is my final test script:

DECLARE @testUtcDate DATETIME = '1/1/2021 02:00:00 AM';
DECLARE @compareDate DATETIME = '12/31/2020';
SELECT @testUtcDate AT TIME ZONE 'CENTRAL STANDARD TIME' AS [UTC DateTime with Adjustment]
,DATEADD(minute, DATEPART(TZOFFSET,@testUtcDate AT TIME ZONE 'CENTRAL STANDARD TIME'), @testUtcDate) [StartDate DateTime Adjusted]
,CONVERT(date, DATEADD(minute, DATEPART(TZOFFSET,@testUtcDate AT TIME ZONE 'CENTRAL STANDARD TIME'), @testUtcDate AT TIME ZONE 'CENTRAL STANDARD TIME')) [StartDate Adjusted]
,CASE WHEN (CONVERT(date, DATEADD(minute, DATEPART(TZOFFSET,@testUtcDate AT TIME ZONE 'CENTRAL STANDARD TIME'), @testUtcDate AT TIME ZONE 'CENTRAL STANDARD TIME'))) = @compareDate THEN 1 ELSE 0 END

So first you have to calculate the time zone difference, then add the difference (negative in my case) from the utc date, and then just grab the date portion so you can compare.

Dear Google

Google Account Disabled

UPDATE: Google eventually (after a few months) re-enabled my account. I now never keep anything permanent there, and can recover if it disappeared (though it would be inconvenient). No longer a trusted resource.

Google:

I have been locked out and not even told why.

For people like me who drank the KoolAid, this is a huge disappointment. That you would lock up my account (read: Phone, Email, Text / Hangouts, PlayStore, Google Docs) and not give me a way to get involved and make it right. It’s terribly frustrating.

Tomorrow I am headed out on a holiday when I was going to work on my writing (all on google drive / docs).

I have Gmail (and have told all of my contacts that I prefer it). I have hundreds of files committed to Google drive (including three novels), that I thought were backed up because I have a local Google drive, but the Google Docs files are only links unlike every other file (my bad for not checking this I suppose). But these files represent 100’s of hours of work and I was entrusting them to your cloud.

I have Google Voice and almost bought the Google cell phone plan.

Not anymore. My cell won’t receive or call out on my Google voice number. You locked up everything and won’t tell me why.

Up ’til now I have been telling everyone that Google products are the way to go, and that they work great. But this lockdown of my work and communications has me rethinking it all. Time to diversify.

I was going to blog about how integrated it all is, and easy to use. I will now instead be blogging about how fast you can lose it all with no way to communicate with the people who locked it down. Getting a person on the phone is impossible so far.

Is this true for any other phone service?

No phone number. Not even a small indication of why it’s locked out. What am I to do? You have monopolized my everyday workflow and given me no recourse.

This is no good. I will tell all of my friends. You had an evangelist. You still have one.

Very disappointed. I would share on Google+ , but I can’t get there.

People need to diversify – have their email with one provider, their cell service with another, their website, yet another, and their important files should not be trusted to the cloud. Keep a local copy. Back up every time.

Don’t trust Google. Your data will be held hostage.

You’ve been warned.

A former Google user.

MORE INFO: This apparently happens to people all the time. Sometimes their account gets unlocked magically after some time has passed. As far as I can tell, it’s rare to be told why your account was locked, and even more rare to get to speak with a person.

My Jess’s senior dance. TAFA Graduation

My Jess’s senior dance. TAFA Graduation 2013 3 ‘Like An Avalanche’ – YouTube http://ow.ly/mF8gC Thanks for an awesome vid, Joey!

Selling my Harley Sportster 1200XL Custo

Selling my Harley Sportster 1200XL Custom ’97 low miles – Good Condition http://ow.ly/mtZsC Great reliable fun bike. http://ow.ly/i/2tCa5

#robbsadler loves #elmah http://ow.ly/kp

#robbsadler loves #elmah http://ow.ly/kpP9D Happy to find this. Make sure that you consider security: http://ow.ly/kpPow

WIndows 8, VPN, Error 942

Windows 8 VPN error 942 « Codes from the field.

if You are having problem with Windows 8 and VPN, this may be the issue. The security protocol is not set at all!

Data Analytics

Changing Times for Data Professionals.

A good, short post on Data Analytics, and why we need to be paying more attention to them. In the end this is an invitation to the conference, but the post applies to all of us that work with data.

This was a weird issue that a coworker had that I thought I would re-post so others (and I) could find it easily when it comes up again. We were adding a report via the report wizard. Visual Studio (apparently) attempts to load the data sources you may have sitting in your Bin folder. If it cannot load one of those (for some reason), it will fail to bring up the report wizard (where you may be creating a new data source anyway).

ReportWizardError

The solution feels a lot like a hack (but this is Microsoft, right – comes with the territory).

Rename your Bin folder, then run your wizard, then rename it back.

Just wow.

I got this solution from here.

Connecting from Windows 8 to a Windows 7 share

This was driving me crazy. I would try several things that didn’t work, and after checking firewall stuff, and many other things — no luck.

Finally I stumbled on this info at :
http://www.neowin.net/forum/topic/1109019-so-windows-8-and-filesharing-does-it-even-work/

On the Win 8 box navigate to the following:
Control Panel\All Control Panel Items\Network and Sharing Center\Advanced sharing settings

Select ‘Use user accounts and passwords to connect to other computers’.

Then I logged into the PC at the computer name level and said save credentials. Ahh – I can finally update subversion from this laptop again!

Thanks SledgeNZ!

Update!

This broke again a week later. I found that somehow windows 7 had its firewall on at the same time. If you are running Norton 360, apparently in some cases, Windows will keep or turn back on its firewall. You should make sure that at your firewall settings:

WindowsFirewall

after selecting “Advanced Settings”:

WindowsFirewallAdvancedSettingsThat the firewall is turned off like shown above.

Disclaimer: Don’t mess with your firewall settings unless you are confident that you know what you are doing as you can lose data, and have your computer infested with viruses!

I am doing this based on input from Norton and have their firewall installed and active, thus a second firewall is both redundant, and can cause problems where you can’t connect when you should be able to.

The pertinent link is: http://community.norton.com/t5/Norton-Internet-Security-Norton/I-can-t-reach-computers-on-my-VISTA-network/m-p/381470/highlight/true#M144115

asp.net GridView BoundField width not working – alternatives

Here is a quick snippet of an issue I ran into. I am not sure where the issue lies with this, but I found that I could not set the ItemStyle-Width=”100px” setting. It would have no effect. In this particular case this was causing the first column of my data to wrap its text.

<asp:GridView ID=”MyGrid” runat=”server” OnRowDataBound=”MyGrid_RowDataBound”

AutoGenerateColumns=”false”>
<Columns>
<asp:BoundField DataField=”Type” HeaderText=”Type” ItemStyle-Wrap=”False” ItemStyle-HorizontalAlign=”Left” />

… more grid stuff here …

The solution I ended up using is posted above. I set ItemStyle-Wrap=”False” and the data pushed out the width of the column. This is a fine solution for this particular time, but there are times when you want to be able to set a specific width. In that case I would use asp:TemplateField instead. The down side of this is that you have to insert your data using Eval().

Peace…