| 名前空間一覧 > GrapeCity.Web.Input.IMDate 名前空間 > GcTime クラス : Format プロパティ |
Public Shadows Property Format As TimeFormat
public new TimeFormat Format {get; set;}
| 例外 | 解説 |
|---|---|
| System.ArgumentException | 無効な時刻書式が設定されています。 |
| キーワード | 説明 |
|---|---|
| t | 12時間制で時刻を表示するときに午前(AMDesignatorプロパティで設定)または午後(PMDesignatorプロパティで設定)を表す文字列の最初の1文字を表示 |
| tt | 12時間制で時刻を表示するときに午前(AMDesignatorプロパティで設定)または午後(PMDesignatorプロパティで設定)を表す文字列を表示 |
| hh | 時を12時間制で表示(先頭に0を付ける) |
| HH | 時を24時間制で表示(先頭に0を付ける) |
| mm | 分を表示(先頭に0を付ける) |
| ss | 秒を表示(先頭に0を付ける) |
| \(Chr(92)) | キーワードをリテラル文字として表示 |
| 区分 | 午前 | 午後 |
|---|---|---|
| 数値入力 | 1 | 2 |
| 文字入力 | a | p |
' 時刻の書式を設定します。 GcTime1.AMDesignator = "午前" GcTime1.PMDesignator = "午後" GcTime1.Format.Pattern = "tt hh時 mm分" GcTime1.DisplayFormat.Pattern = "tt hh時 mm分"
// 時刻の書式を設定します。 GcTime1.AMDesignator = "午前"; GcTime1.PMDesignator = "午後"; GcTime1.Format.Pattern = "tt hh時 mm分"; GcTime1.DisplayFormat.Pattern = "tt hh時 mm分";
Imports GrapeCity.Web.Input.IMDate ' 時刻の書式を設定します。 GcTime1.AMDesignator = "午前" GcTime1.PMDesignator = "午後" GcTime1.Format = New TimeFormat("tt hh時 mm分") GcTime1.DisplayFormat = New TimeDisplayFormat("tt hh時 mm分")
using GrapeCity.Web.Input.IMDate; // 時刻の書式を設定します。 GcTime1.AMDesignator = "午前"; GcTime1.PMDesignator = "午後"; GcTime1.Format = new TimeFormat("tt hh時 mm分"); GcTime1.DisplayFormat = new TimeDisplayFormat("tt hh時 mm分");