Thursday 10 April 2014

Calculated Column DateTime to date Convert

I was recently working with Calculated Column and i face a horrible nightmare type issue. I just need to copy date-time column value to a date type column. But it takes at least 3 to 4 hours of mine. Then I found this. I forget to get link but I get this much info which i want to share with you.

 =IF(TEXT(([End Time]-[Start Time])-TRUNC(([End Time]-[Start Time]),0),"0.000000000")="0.999305556",[Start Time]+1,[Start Time])
Basically, the formula checks whether the event is an all day event and if so increases the value by whatever you need. It determines whether the event is all day by checking the difference between the end time and smart time (12:00am to 11:59pm).
Here's the formula as I used it:
=IF(TEXT(([End Time]-[Start Time])-TRUNC(([End Time]-[Start Time]),0),"0.000000000")="0.999305556",[Start Time]+1,[Start Time])
So, get the difference between end time and start time, then subtract the truncated value of the same value (get rid of the value to the left of the decimal which would indicate that the all day event spans multiple days). If the difference is .999305556 then I'm adding 1 day to the value of start time (since I'm only interested in showing the date, not the time), otherwise leave the date/time as is.
Hope that helps someone else with calculated date columns.


Wednesday 9 April 2014

Hide/Show Result window

I have this question from long time in my mind. Whenever i run query in SQL result window acquire half the space.look at the figure.




 I generally decrease the size of the result window and continue to work on.  Now I get the solution. Just Press Ctrl + R and it hide. press it again and it shows up. I hope this shortcut will be useful to you too.

Crop In Paint

Generally I used to editing image in paint . So i just wanna saw how a functionality named crop make my work easy.

Long way

1. open image and select the part


2. Copy or cut the part

 

3. open new file

 

4. paste

 

5. save

 

shortcut using crop

1. open image and select the part

 

2. click the crop

 

3. save

 That's simple one but very useful when doing documentation for your project.

How to remove Security warning when using https.

Recently I was working on a project which uses the HTTPS for URL.I face a unique problem in that some of my pages contents are not fully loaded in the browser like model popup.

 

So I took some steps to avoid this problem.

1. go to internet options.

 

2. open security tab and click on custom tab.

 

3. slide down till option "Display Mixed content".

 

4. change it to "Enable" and save the changes.

 

5. refresh the page.

Note: I prefer to work with IE. This solution figures are from IE11.



Tuesday 8 April 2014

SQL StoreProcedure Change Report Generate

To Create SQL Procedure Change Report

 1. Select your Database Store procedure folder Your database -> Programmability -> Store Procedure 2.In ribbon , View-> Object Explorer Details or press F7 (as Shown in figure) 


That's it. You will See the Report. To check when modification has done Select the Date Last Modified column as shown in fig.