Hari ini gue dapat job maintenance dari user untuk merubah tampilan data pada kolom, disamping belajar sekalian di share disini, semoga bermanfaat :)
Code Before : Text='<%# Bind("IncentiveDate","{0:MM/dd/yyy}") %>'
Preview Result Before : (month/day/year) = 10/18/2010
Code After : Text='<%# Bind("IncentiveDate","{0:D}") %>'
Preview Result After: (day, month date, year) = Monday, October 18, 2010
Berikut daftar format tanggal yang dapat digunakan :
Format Pattern | Name | Example |
d | Short date | 11/8/2008 |
D | Long date | Sunday, August 11, 2008 |
t | Short time | 3:32 PM |
T | Long time | 3:32:00 PM |
f | Full date/time (short time) | Sunday, August 11, 2008 3:32 PM |
F | Full date/time (long time) | Sunday, August 11, 2008 3:32:00 PM |
g | General date/time (short time) | 8/11/2008 3:32 PM |
G | General date/time (long time) | 8/11/2008 3:32:00 PM |
m or M | Month day | August 11 |
r or R | RFC 1123 | Sun, 11 Aug 2008 8:32:00 GMT |
s | Sortable date/time | 2008-08-11T15:32:00 |
u | Universable sortable date/time | 2008-08-11 15:32:00z |
U | Universable sortable date/time | Sunday, August 11, 2008 11:32:00 PM |
y or Y | Year month | August, 2008 |
........................................................................................................................................