Question: ```
select packageid,status+' Date : '+UpdatedOn from [Shipment_Package] 

```

The below error is appeared when executing the above code in sql server. The type of `UpdatedOn` is `DateTime` and status is a `varchar`. We wanted to concatenate the status, Date and UpdatedOn. 

error:

> 
> Conversion failed when converting date and/or time from character
>  string.
> 
> 
>

Answer: 
You need to convert `UpdatedOn` to `varchar` something like this:

```
select packageid, status + ' Date : ' + CAST(UpdatedOn AS VARCHAR(10))
from [Shipment_Package];

```

You might also need to use [`CONVERT`](http://msdn.microsoft.com/en-us/library/ms187928.aspx) if you want to format the datetime in a specific format.
To achive what you need, you would need to CAST the Date?

Example would be;

Your current, incorrect code:

```
select packageid,status+' Date : '+UpdatedOn from [Shipment_Package] 

```

Suggested solution:

```
select packageid,status + ' Date : ' + CAST(UpdatedOn AS VARCHAR(20))
from [Shipment_Package] 

```

[MSDN article for CAST / CONVERT](http://msdn.microsoft.com/en-us/library/ms187928.aspx)

Hope this helps.