{"id":86,"date":"2020-06-02T20:50:13","date_gmt":"2020-06-02T20:50:13","guid":{"rendered":"http:\/\/bahadirmeric.net\/bahadir\/?p=86"},"modified":"2020-06-02T20:50:13","modified_gmt":"2020-06-02T20:50:13","slug":"zaman-formatindaki-degeri-saniye-degerine-dondurmek","status":"publish","type":"post","link":"http:\/\/bahadirmeric.net\/bahadir\/2020\/06\/02\/zaman-formatindaki-degeri-saniye-degerine-dondurmek\/","title":{"rendered":"Zaman Format\u0131ndaki De\u011feri Saniye De\u011ferine D\u00f6nd\u00fcrmek"},"content":{"rendered":"\n<p>Bazen yazd\u0131\u011f\u0131n\u0131z sorgular da zaman format\u0131n da ki bir de\u011feri saniye cinsinden tekrardan hesaplaman\u0131z gerekebilir. B\u00f6yle bir durumda SQL haz\u0131r fonksiyonlar\u0131 tam olarak i\u015finizi g\u00f6rmez i\u015fte o zaman kullanman\u0131z sizin yard\u0131m\u0131n\u0131za ko\u015fan fonksiyon a\u015fa\u011f\u0131daki yer almakta \ud83d\ude42<\/p>\n\n\n\n<p>Fonksiyona yaln\u0131z de\u011feri string tipte g\u00f6ndermeniz gerekmektedir !!!<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\nCREATE FUNCTION &#x5B;dbo].&#x5B;fConvertDuration] (@value  NVARCHAR(20))\n   RETURNS INT AS\nBEGIN\n    DECLARE @Hour NVARCHAR(20)\n    DECLARE @Minute NVARCHAR(20)\n    DECLARE @Second NVARCHAR(20)\n    DECLARE @nHour int\n    DECLARE @nMinute int\n    DECLARE @nSecond int\n \n    SET @Hour = dbo.fString_Split(@value,1,':')\n    SET @Minute = dbo.fString_Split(@value,2,':')\n    SET @Second = dbo.fString_Split(@value,3,':')\n \n    SET @nHour = CAST(@Hour AS INT)\n    SET @nMinute = CAST(@Minute AS INT)\n    SET @nSecond = CAST(@Second AS INT)\n \n    IF(@nMinute &gt; 0)\n    BEGIN\n        SET @nSecond = @nSecond + (60 * @nMinute)\n    END\n \n    IF(@nHour &gt; 0)\n    BEGIN\n        SET @nSecond = @nSecond + (60 * (60 * @nHour))\n    END\n \n    RETURN @nSecond\nEND\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Bazen yazd\u0131\u011f\u0131n\u0131z sorgular da zaman format\u0131n da ki bir de\u011feri saniye cinsinden tekrardan hesaplaman\u0131z gerekebilir. B\u00f6yle bir durumda SQL haz\u0131r fonksiyonlar\u0131 tam olarak i\u015finizi g\u00f6rmez i\u015fte o zaman kullanman\u0131z sizin yard\u0131m\u0131n\u0131za ko\u015fan fonksiyon a\u015fa\u011f\u0131daki yer almakta \ud83d\ude42 Fonksiyona yaln\u0131z de\u011feri string tipte g\u00f6ndermeniz gerekmektedir !!!<\/p>\n","protected":false},"author":1,"featured_media":10,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[8,2],"class_list":["post-86","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql","tag-ms-sql","tag-sql"],"_links":{"self":[{"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":1,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":87,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/posts\/86\/revisions\/87"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/media\/10"}],"wp:attachment":[{"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bahadirmeric.net\/bahadir\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}