{"id":917,"date":"2018-08-10T00:00:37","date_gmt":"2018-08-09T15:00:37","guid":{"rendered":"http:\/\/ji-develop.com\/blog\/?p=917"},"modified":"2022-05-06T16:57:08","modified_gmt":"2022-05-06T07:57:08","slug":"sql-server%e3%81%aegetdate%e3%82%92linq%e3%81%8b%e3%82%89%e6%8c%87%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/ji-develop.com\/blog\/sql-server%e3%81%aegetdate%e3%82%92linq%e3%81%8b%e3%82%89%e6%8c%87%e5%ae%9a","title":{"rendered":"\u3010SQL Server\u3011GETDATE()\u3092LINQ\u304b\u3089\u6307\u5b9a"},"content":{"rendered":"<p>\u30ec\u30b3\u30fc\u30c9\u306e\u767b\u9332\u30fb\u66f4\u65b0\u306e\u969b\u306f\u3088\u304f\u767b\u9332\u65e5\u6642\u3084\u66f4\u65b0\u65e5\u6642\u3092\u30ab\u30e9\u30e0\u306b\u6301\u305f\u305b\u3066\u8a18\u9332\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>C#\u5074\u3067\u73fe\u5728\u65e5\u6642\u3092\u53d6\u5f97\u3059\u308b\u6642\u306f\u300c<span class=\"crayon-i\">DateTime<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-i\">Now\u300d<\/span><br \/>\nSQL Server\u5074\u3067\u73fe\u5728\u65e5\u6642\u3092\u53d6\u5f97\u3059\u308b\u6642\u306f\u300cGETDATE()\u300d<\/p>\n<p>\u3092\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u3060\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u65e5\u6642\u5224\u5b9a\u3067\u51e6\u7406\u3059\u308b\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u969b\u3001AP\u30b5\u30fc\u30d0\u30fc\u3068DB\u30b5\u30fc\u30d0\u30fc\u3067\u65e5\u6642\u8a2d\u5b9a\u306b\u82e5\u5e72\u8aa4\u5dee\u304c\u3042\u308b\u3068\u4e0a\u624b\u304f\u52d5\u304b\u306a\u3044\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u50d5\u304c\u9665\u3063\u305f\u30b1\u30fc\u30b9\u3068\u3057\u3066\u3001\u57fa\u672c\u7684\u306bSQL Server\u306eGETDATE()\u3067\u65e5\u6642\u3092\u30bb\u30c3\u30c8\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3092\u3001C#\u3067<span class=\"crayon-i\">DateTime<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-i\">Now\u304b\u3089<\/span>LINQ\u306e\u30e1\u30bd\u30c3\u30c9\u5f0f\u3092\u901a\u3057\u3066\u65e5\u6642\u3092\u30bb\u30c3\u30c8\u3057\u305f\u3089\u3001AP\u30b5\u30fc\u30d0\u30fc\u3068DB\u30b5\u30fc\u30d0\u30fc\u306e\u65e5\u6642\u8aa4\u5dee\u3067\u8272\u3005\u30cf\u30de\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<\/p>\n<h2>\u5bfe\u51e6\u65b9\u6cd5<\/h2>\n<p>LINQ\u3067\u3082SQL Server\u306eGETDATE()\u3092\u53c2\u7167\u3057\u3066\u65e5\u4ed8\u3092\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p><script src=\"https:\/\/gist.github.com\/jun4554\/b22cb1dfab33e59e3657a0d712166351.js\"><\/script><\/p>\n<p>AP\u3068DB\u304c\u540c\u3058\u30b5\u30fc\u30d0\u30fc\u306b\u3042\u308c\u3070\u3053\u3093\u306a\u554f\u984c\u306f\u8d77\u3053\u3089\u306a\u3044\u3067\u3057\u3087\u3046\u304c\u3001\u5927\u898f\u6a21\u30b7\u30b9\u30c6\u30e0\u3067\u3042\u308c\u3070\u305d\u3093\u306a\u69cb\u6210\u306f\u307e\u305a\u306a\u3044\u3067\u3057\u3087\u3046\u3057\u3001\u4ed5\u69d8\u3068\u3057\u3066\u3069\u3061\u3089\u306e\u65e5\u4ed8\u3092\u4f7f\u3046\u304b\u306f\u4e88\u3081\u6c7a\u3081\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u306d\u3002<\/p>\n<p>\u4e00\u822c\u7684\u306b\u306fDB\u30b5\u30fc\u30d0\u30fc\u5074\u3092\u898b\u308b\u65b9\u304c\u30d9\u30bf\u30fc\u3060\u3068\u601d\u3044\u307e\u3059\u304c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ec\u30b3\u30fc\u30c9\u306e\u767b\u9332\u30fb\u66f4\u65b0\u306e\u969b\u306f\u3088\u304f\u767b\u9332\u65e5\u6642\u3084\u66f4\u65b0\u65e5\u6642\u3092\u30ab\u30e9\u30e0\u306b\u6301\u305f\u305b\u3066\u8a18\u9332\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002 C#\u5074\u3067\u73fe\u5728\u65e5\u6642\u3092\u53d6\u5f97\u3059\u308b\u6642\u306f\u300cDateTime.Now\u300d SQL Server\u5074\u3067\u73fe\u5728\u65e5\u6642\u3092\u53d6\u5f97\u3059\u308b\u6642\u306f\u300cGETDATE()\u300d \u3092&#8230;<\/p>\n","protected":false},"author":1,"featured_media":426,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[14,17,13,8],"tags":[],"class_list":{"0":"post-917","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-c","8":"category-linq","9":"category-sql-server","10":"category-8","11":"article cf"},"_links":{"self":[{"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/posts\/917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/comments?post=917"}],"version-history":[{"count":9,"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/posts\/917\/revisions"}],"predecessor-version":[{"id":1230,"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/posts\/917\/revisions\/1230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/media\/426"}],"wp:attachment":[{"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/media?parent=917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/categories?post=917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ji-develop.com\/blog\/wp-json\/wp\/v2\/tags?post=917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}