Select date menggunakan format [YYYY/MM/DD] pada SQL Server

Query select untuk mendapatkan format tanggal 'YYYY/MM/DD' pada SQL Server


Ketika anda melakukan query select pada tabel  yang  fieldnya bertipe datetime di Sql Server, maka anda akan mendapatkan format tanggal seperti ini 'mmm dd yyyy' nah untuk merubah format tanggalnya ke format lain seperti YYYY/MM/DD rekan2 bisa menggunakan query seperti  di bawah ini:

SELECT CONVERT(VARCHAR(10), tanggal_lahir, 111) AS [YYYY/MM/DD] from mahasiswa;

Selamat Mencoba!

COMMENTS

BLOGGER: 2
Loading...
Review http://ilmusetitik.blogspot.com/ on alexa.com
Nama

Apache,3,Bisnis Online,1,Blog,1,CSS,1,Framework,1,HTML,1,HTML and CSS,2,Info,2,Javascript,2,Javascript and AJAX,5,linux,2,MySQL,2,Networking,1,Open GL,1,Optimasi Website,7,Pemrograman java,1,Pemrograman web,5,PHP,6,phpMyAdmin,1,SEO,3,SQL Server,5,Xampp,1,
ltr
item
Nanang Gunawan Blog: Select date menggunakan format [YYYY/MM/DD] pada SQL Server
Select date menggunakan format [YYYY/MM/DD] pada SQL Server
Query select untuk mendapatkan format tanggal 'YYYY/MM/DD' pada SQL Server
https://4.bp.blogspot.com/-W3KmPPUFdeQ/WOHPQQiL0gI/AAAAAAAAAqM/cPM95v3Gh8MAxZ3zGd2nZqSypuVhy-g-wCLcB/s1600/SQL%2BServer%2BDate%2BFormat.jpg
https://4.bp.blogspot.com/-W3KmPPUFdeQ/WOHPQQiL0gI/AAAAAAAAAqM/cPM95v3Gh8MAxZ3zGd2nZqSypuVhy-g-wCLcB/s72-c/SQL%2BServer%2BDate%2BFormat.jpg
Nanang Gunawan Blog
http://www.nananggunawan.com/2012/02/select-date-menggunakan-format-yyyymmdd.html
http://www.nananggunawan.com/
http://www.nananggunawan.com/
http://www.nananggunawan.com/2012/02/select-date-menggunakan-format-yyyymmdd.html
true
4195327445586723627
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy