私のデータベースにはこのような数値があります。
14192555.00
それを取得してテキストボックスに入れて文字列に変換すると、
this.txtPriorNYSDOTRating.Text = ds.Tables[0].Rows[0]["Fact2A_PriorNYSDOTPerfRatingScore"].ToString();
14192555.0000
それをフォーマットするために私も試しました、
this.txtPriorNYSDOTRating.Text = ds.Tables[0].Rows[0]["Fact2A_PriorNYSDOTPerfRatingScore"].ToString("0.####");
エラー " no overload for method string
"が発生します
ご提案をお待ちしております。
編集:
私はデータベースに日付を持っています、
2010-10-19 00:00:00.000
私はそれが好きです、
10/19/2010 12:00:00 AM
私のコードは、
this.txtDesignatedDate.Text =Convert.ToDateTime(ds.Tables[0].Rows[0]["DesignatedDate"]).ToString();
「10/19/2010」のみを取得するようにフォーマットする方法
返信をお待ちしております