Question: I have integrated the `Wepay payment gateway`. But I have facing a problem to pass `json object to wepay`. It always shows a incorrect json format. Please look at the below code. 

```
$forca_a = array(
  'debit_opt_in'=>true
);
$forca = json_encode($forca_a,JSON_FORCE_OBJECT);
$wepay_create_array = array(
  'name' =>"xxxx",
  'description' => "xxxxxxxxx xxxx",
  'callback_uri' => "xxxxxxx",
  'country' => "CA",
  'currencies' => array('CAD'),
  'country_options' => $forca,
  'rbits'=> array(
               array(
                  'receive_time'=>strtotime("now"),
                  'type' =>'website_uri',
                  'source' => 'partner_database',
                  'properties'=> array('uri'=>xxxxx)
               )
            )
);

```

If I won't pass the `country_options`, its seems to working but If I pass this parameter, it always give me an error says "Incorrect JSON format".

I sent an email to wepay help center. They told me that, you are passing the string `"country_options":"{"debit_opt_in":true}" <--- this is a string` Instead of `"country_options":{"debit_opt_in":true} <--- this is a JSON object`. So I'm confused. I have no idea how do I pass the JSON object. There is only way and is `json_encode($object)`.

Answer: 
The `rdr.GetValue(int32)` method returns an `object` and not `DateTime`.

> 
> <https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getvalue(v=vs.110).aspx>
> 
> 
> 

Parse your the returned value into a `DateTime` object and then use the `ToString` method.
That will work only for DateTime value, you can convert the value in DateTime first:

```
lblDate.Text = Convert.ToDateTime(rdr.GetValue(4)).ToString("MMMM d,yyyy");

```