sql server – How to get age

 

“datediff” function wont be helpful for calculating age in SQLSERVER.  Below query gives an idea on how to calculate age.

declare @bday datetime Set @bday = ‘2000-02-28 00:00:00.000’
declare @as_of datetime Set @as_of = ‘2002-03-01 00:00:00.000’

select
@bday,
@as_of,
Convert(Char(8),@as_of,112),
Convert(Char(8),@bday,112),
0 + Convert(Char(8),@as_of,112) – Convert(Char(8),@bday,112),
(0 + Convert(Char(8),@as_of,112) – Convert(Char(8),@bday,112)) / 10000

python TypeError: can’t multiply sequence by non-int of type ‘float’

 

This error shows up when there is a type mismatch.

Example:

When you execute below code you will get this error-
 

>> hrs = input(“Enter Hours:”)
Enter Hours:40
>>> rate =float( input(“Enter Rate”))
enter rate: 10
>>> pay = hrs*rate
TypeError: can’t multiply sequence by non-int of type ‘float’

 

Solution for this:

hrs = float(input(“Enter Hours:”))
rate = float(input(“enter rate”))
pay = hrs*rate
print(‘Pay:’ , pay)

Cognos analytics- how to run a report using URL

Check below link for details.
http://www-01.ibm.com/support/docview.wss?uid=swg21983556

By using above mentioned steps your final url will look like

http://servername:9300/bi/v1/disp?b_action=cognosViewer&run.outputFormat=HTML&run.prompt=true&ui.object=storeID (%22insert_StoreID_here%22)&ui.action=run&cv.header=false&cv.toolbar=false
9300[servername/ibmcognos/cgi-bin/cognosisapi.dll?b_action=cognosViewer&run.outputFormat=HTML&run.prompt=true&ui.object=storeID(%22insert_StoreID_here%22)&ui.action=run&cv.header=false&cv.toolbar=false