並び順

ブックマーク数

期間指定

  • から
  • まで

401 - 440 件 / 981件

新着順 人気順

datetimeの検索結果401 - 440 件 / 981件

  • GitHub - mirego/microscope: 🔬 Microscope adds useful scopes targeting ActiveRecord boolean, date and datetime fields.

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

      GitHub - mirego/microscope: 🔬 Microscope adds useful scopes targeting ActiveRecord boolean, date and datetime fields.
    • MYSQLでタイムゾーンがズレたまま入ってしまったdatetimeを一括で直したい | やぶろぐ - ooyabuh.org -

      MYSQLでタイムゾーンがズレたまま入ってしまったdatetimeを一括で直したいやぶろぐ – ooyabuh.org - RailsでActiveRecordのTimeZoneを指定し忘れてて、しばらく運用して入ったレコードの時間がキレイに日本時間-9hだったのでCONVERT_TZって便利な関数があるのでそれでパッチした。

      • PHPの DateTimeオブジェクトは比較演算子で大小を比較できる

        ► 2018 (1) ► 1月 (1) ► 2017 (4) ► 6月 (3) ► 5月 (1) ► 2016 (15) ► 12月 (4) ► 11月 (1) ► 10月 (2) ► 7月 (3) ► 6月 (1) ► 5月 (3) ► 1月 (1) ► 2015 (13) ► 12月 (1) ► 10月 (1) ► 9月 (1) ► 6月 (1) ► 5月 (1) ► 3月 (2) ► 2月 (3) ► 1月 (3) ► 2014 (11) ► 12月 (1) ► 9月 (2) ► 8月 (2) ► 6月 (1) ► 4月 (4) ► 2月 (1) ► 2013 (15) ► 12月 (3) ► 11月 (3) ► 8月 (2) ► 7月 (4) ► 5月 (1) ► 4月 (2) ► 2012 (7) ► 10月 (1) ► 7月 (1) ► 4月 (3) ► 1月 (2) ► 20

        • PHP 日付のフォーマット date()/strtotime()/DateTimeクラス | WEPICKS!

          PHP で日付や時刻を取得する関数やクラス、date()関数、strtotime()関数、DateTimeクラス には、パラメーター(関数やクラスに送る値)にフォーマット(書式)があります。フォーマットに従って記述することで、これらの関数やクラスが正しく日時を理解することが出来ます。例えば echo date('Y/m/d'); とすると、現在の年月日が 2019/06/01 という文字列として返ってきます。 書式 date() 日時の文字列 = date('日付/時刻フォーマット文字列' [,UNIXタイムスタンプ]); //[ ]省略可(タイムスタンプがない場合現在日時となる) //返り値は文字列(string) 書式 strtotime() 指定日時のUNIXタイムスタンプ = strtotime('英文形式 OR 日付/時刻 フォーマット文字列'); //返り値は数値(int)、失

          • GitHub - shumpei/iso8601.js: JavaScript Library for ISO8601-datetime format. It aims compatibility for HTML5 (Web Forms2) forms.

            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

              GitHub - shumpei/iso8601.js: JavaScript Library for ISO8601-datetime format. It aims compatibility for HTML5 (Web Forms2) forms.
            • Perl/日付・時間処理/DateTime - yanor.net/wiki

              DateTime(高機能だが重い) DateTimeオブジェクトを作る $dt = DateTime->from_epoch(epoch => time(), time_zone => 'Asia/Tokyo'); $dt = DateTime->now(time_zone => 'Asia/Tokyo'); $dt = DateTime->new( year => 1945, month => 8, day => 15, hour => 0, minute => 0, second => 0, time_zone => 'Asia/Tokyo', ); DateTimeオブジェクトを作る場合、基本的にタイムゾーンを指定すること。 月末のDateTimeオブジェクトを作る $dt = DateTime->last_day_of_month(year => 2009, month => 2,

              • DateTime Picker

                DateTime Picker Responsive Flat design jQuery based DateTime Picker for Web & Mobile

                • ミリ秒とかナノ秒とか(datetime 型と datetime2 型のこと)

                  補足 これは 2013 年に書いた記事で、当時 MSDN を参照していました。現在リンク先の MSDN はなくなり、Microsoft Docs にリダイレクトされますが、記述が MSDN のときとは違っているのでご注意ください。 今回も技術ネタ。 Windows OS 自体、リアルタイム OS ではないので、時間、時刻などを取り扱う際に、どえらい精度は望めない。 SQL Server 2008 から、datetime2 型というのが導入されたのだけれども、100 ナノ秒の精度の値を格納できる。つまり、2013/3/13 12:34:56.1234567 というような値を格納できる。でも、今まで GETDATE() なんかでやっていた処理は、2013/3/13 12:34:56.123 というこれまでの datetime 型と同じ精度でしか取得できない。この GETDATE() 関数で取得

                    ミリ秒とかナノ秒とか(datetime 型と datetime2 型のこと)
                  • PHPでマイクロ秒精度のDateTimeを生成する際の注意点 - EZOLAB - エゾラボ

                    DateTimeで現在日時を取得する ハローみなさん、エジソンです。 PHPで日付時刻を取り扱うには、DateTimeクラスがおすすめです。 PHPで日付・時刻を操作する - チートシート 今回は、DateTimeクラスで、現在時刻を取得する方法を紹介します。 <?php // 現在日時を生成 $now = new \DateTime(); // 出力 echo $now->format('Y-m-d H:i:s.u'); ?> 2015-10-24 02:37:31.000000 出力時のフォーマットに、”年月日時分秒+マイクロ秒(小数点以下、6桁)”を指定しています。しかし、結果を見ると小数点以下が全て0になることが分かります。 DateTimeでマイクロ秒精度の現在日時を取得する どうやら、PHPでは通常の方法で、マイクロ秒精度の情報を得ることはできないようです。では、どのような方法

                      PHPでマイクロ秒精度のDateTimeを生成する際の注意点 - EZOLAB - エゾラボ
                    • Rails 5 handles DateTime with better precision

                      MySQL 5.6.4 and up has added fractional seconds support for TIME, DATETIME, and TIMESTAMP values, with up to microseconds (6 digits) precision. Adding precision to migration To add precision on datetime column we need to add limit option to it. By default it is set to 0. 1 2def change 3 add_column :users, :last_seen_at, :datetime, limit: 6 4end 5 Copy This adds precision(6) to last_seen_at column

                        Rails 5 handles DateTime with better precision
                      • [PHP]DateTime::diffで誕生日までの日数を求める : Strings of Life

                        DateTimeクラスの練習として作成したPHPスクリプト↓ $my_next_birthday = '2013/05/11';//次の誕生日 $today = new DateTime(); $birthday = new DateTime($my_next_birthday); $interval = $today->diff($birthday, true); echo $interval->format('あなたの誕生日は%mヶ月と%d日後です。'); <解説> DateTimeクラスには日付・時刻の操作に関するメソッドが詰まっている。日付の整形くらいならdate関数でもいいけど、DateTimeを使えば差分を一発でとったり加算・減算をしたりといった処理を手軽に行うことができる(まあ、strtotime関数を使った処理でも大した手間ではないけど…)。 DateTime::diffメ

                          [PHP]DateTime::diffで誕生日までの日数を求める : Strings of Life
                        • Patching datetime.date.today() across Python implementations - XelNext

                          Altering builtin functions and classes of Python during tests if often frowned upon, but can be actually required while writing unit tests. The typical builtin requiring such alterations are the datetime.date.today and datetime.datetime.now() functions, which return (obviously) time-dependent values. We'll take a look at this issue throught the (now standard) mock library. The problem The naive ap

                          • xml schema での datetime の扱い - kameidの備忘録 - Sharpen the Saw!

                            Time Zones To specify a time zone, you can either enter a dateTime in UTC time by adding a "Z" behind the time - like this: <startdate>2002-05-30T09:30:10Z</startdate> http://www.w3schools.com/Schema/schema_dtypes_date.asp soap でやり取りしてる datetime 型が、送信した時刻から9時間ずれて送信されるーー、という事象。 実はずれているのではなく、末尾に 'Z' が付与されている場合、GMT のタイムゾーンとして取り扱われているだけ。 特に難しい話ではなさそうなのだが、時にややこしい。 <birthday xsi:type="xsd:dateTime">1971

                              xml schema での datetime の扱い - kameidの備忘録 - Sharpen the Saw!
                            • DateTime-TimeZone-2.63

                              The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

                                DateTime-TimeZone-2.63
                              • Nakajijapan » datetime_selectをカスタマイズしたときのあれ

                                Warning: mysql_real_escape_string(): No such file or directory in /home/sites/heteml/users/n/a/k/nakajijapan/web/nakajijapan.blog/wp-content/plugins/easy-google-syntax-highlighter/easy-google-syntax-highlighter.php on line 50 Warning: mysql_real_escape_string(): A link to the server could not be established in /home/sites/heteml/users/n/a/k/nakajijapan/web/nakajijapan.blog/wp-content/plugins/easy-

                                • Pythonメモ-79 (ciso8601) (datetime, strptime, parse_datetime, 最速日付解析ライブラリ) - いろいろ備忘録日記

                                  概要 インストール とりあえず動かしてみる 結果 通常の datetime.strptime の場合 ciso8601 備考 概要 ひょんなことで見つけたライブラリ。日付文字列をdatetimeに変換してくれるライブラリなのですが、最速みたいです。 www.peterbe.com githubページは以下。 github.com ciso8601という名前の通り、C言語で実装されています。 iso8601のフォーマットに対応しているので、その形式の文字列であればパース可能ということです。 とりあえず、一旦遊んでみました。 インストール インストールは、condaでやりました。 (trypython) λ conda install ciso8601 -y Solving environment: done ## Package Plan ## environment location: C

                                    Pythonメモ-79 (ciso8601) (datetime, strptime, parse_datetime, 最速日付解析ライブラリ) - いろいろ備忘録日記
                                  • SQL Server 2008で日付の最小値、最大値は.Net FrameworkのDateTimeと同等になる模様。 « Bluestick.JP 開発メモ

                                    SQL Server 2008で日付の最小値、最大値は.Net FrameworkのDateTimeと同等になる模様。 現状、SQL Serverと.NetのDateTimeの値の範囲はずれているが、SQL Server 2008で追加される日付型のdate, datetime2, datetimeoffsetでは、その範囲は 日付:1-1-1~9999-12-31 時間:00:00:00~23:59:59.9999999 で、.Net Framework相等になる模様。参考サイト

                                    • datetime の UTC / JSTの変換についてまとめ

                                      datetime.datetimeのオブジェクトをUTCやJSTに変換するさいのパターンを網羅してみます。 datetime型には、timezone情報がついているかどうかの区別がある。timezone情報があるもの=aware。ないもの=native。 タイムゾーンの準備 timezoneを扱う場合はdateutilを使用するのが今日では一般的のよう。 メジャーな日付操作ライブラリとしてはdateutilかpytzがある 標準ライブラリのtimezoneにtimedeltaで生成するのも+-9時間のようなシンプルなものなら便利 pytzは厳密すぎて+09:19のようなハマりがあるので避けたほうが良い Python3.9以降限定ならば標準ライブラリのzoneinfoを使うのも良い ひとまずここでは、Python3.9以前のことも考慮してdateutilを使用します。 pip install

                                        datetime の UTC / JSTの変換についてまとめ
                                      • JavaScript DateTime and TimeSpan Wrappers

                                        A couple of JavaScript classes with the well known .NET's classes capabilities <script type="text/javascript"> //Get the current date and time stamp. var date = DateTime.now(); //Add 100 hours to the date date = date.addHours(100); //Write the date in a formatted fashion: Monday, 15/Feb/2012 document.writeline("dddd, dd/MMM/yyyy"); </script> Yes, the usage is very similar to .NET, but it's pure Ja

                                        • 文字列からdatetime型への変換メモ - 超自己満足プログラミング

                                          「YYYY-MM-DDThh:mm:ssZ」形式(ISO 8601 - Wikipedia)で表される文字列を、datetime型に変換する import datetime str = '2009-07-16T11:13:00Z' dt = datetime.datetime.strptime(str, "%Y-%m-%dT%H:%M:%SZ") これで一応、datetime型(UTC)になってるはず。

                                            文字列からdatetime型への変換メモ - 超自己満足プログラミング
                                          • What is the standard way to add N seconds to datetime.time in Python?

                                            Given a datetime.time value in Python, is there a standard way to add an integer number of seconds to it, so that 11:34:59 + 3 = 11:35:02, for example? These obvious ideas don't work: >>> datetime.time(11, 34, 59) + 3 TypeError: unsupported operand type(s) for +: 'datetime.time' and 'int' >>> datetime.time(11, 34, 59) + datetime.timedelta(0, 3) TypeError: unsupported operand type(s) for +: 'dateti

                                              What is the standard way to add N seconds to datetime.time in Python?
                                            • 「DateTime型をエポック値に変換してから戻す際の誤差について」(1) Insider.NET - @IT

                                              @IT 会議室 Indexリンク Windows Server Insider Insider.NET System Insider XML & SOA Linux Square Master of IP Network Java Solution Security & Trust Database Expert RFID+IC リッチクライアント & 帳票 Server & Storage Coding Edge @ITクラブ Cafe VB業務アプリケーション開発研究 @IT SpecialPR

                                              • C# DateTime ToString の便利な書き方~日付を楽に文字列に変換~ - LemonteaのUnity部屋

                                                こんにちは。レモンティーです。 以前、↓の記事にて 日付の文字列への変換について書きました。 sawalemounity.hatenablog.com しかしこれでも結構書く量は多いので、 今回はもっと省略できる書き方を集めてみました。 以下、書き方と出力のセットです。 dateはDateTime型の変数で、2017年11月11日22時33分44秒です。 まずは前回の内容です date.ToString("yyyy-MM-dd-HH-mm-ss"); ↓ 2017-11-11-22-33-44これの追加知識たちがこの↓二つ date.ToString("tt hh:mm"); ↓ 午後 10:33どうもttで午前・午後が表示できるようです。 date.ToString("HH時mm分ss秒"); ↓ 22時33分44秒また、hhだと12時間制、HHだと24時間制 になるようです。 以下はア

                                                  C# DateTime ToString の便利な書き方~日付を楽に文字列に変換~ - LemonteaのUnity部屋
                                                • DateTime group by date and hour

                                                  I have a datetime called activity_dt and the data looks like this: 2/5/2013 9:24:00 AM 2/7/2013 7:17:00 AM How do i group by date and hour?

                                                    DateTime group by date and hour
                                                  • How do you set a default value for a MySQL Datetime column?

                                                    How do you set a default value for a MySQL Datetime column? In SQL Server it's getdate(). What is the equivalant for MySQL? I'm using MySQL 5.x if that is a factor.

                                                      How do you set a default value for a MySQL Datetime column?
                                                    • ASP.NET で Web アプリケーション上やコンソール アプリケーションの複数スレッドで同時に DateTime.Parse を処理すると、FormatException が発生することがある - Microsoft サポート

                                                      現象 Microsoft ASP.NET で Web アプリケーション上やコンソール アプリケーションの複数スレッドで同時に、DateTime.Parse を処理すると、まれに FormatException が発生し以下のエラーメッセージが表示されることがあります。 また、この現象は、コンソールやサービス アプリケーションが複数スレッドで DateTime.Parse を使っている場合にも発生する場合があります。 Exception: System.FormatException はハンドルされませんでした。 Message: "文字列は有効な DateTime ではありませんでした。" StackTrace: 場所 System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) 場

                                                      • 【Dart】Stringからint, double, DateTimeに変換する|Flutterラボ

                                                        String型から別の型に変換することはFlutter開発ではよくあることなので、その方法を紹介したいと思います。 あらゆる型変換の方法のまとめて解説した動画を『Flutterラボ』で公開しているので、こちらもご覧ください。 String から int に変換 int.parse('100'); // String から int に変換String から double に変換 double.parse('0.8'); // String から double に変換String から DateTime に変換 DateTime.parse('2020-09-30 12:30:50'); // String から DateTime に変換

                                                          【Dart】Stringからint, double, DateTimeに変換する|Flutterラボ
                                                        • Class-CGI-DateTime-0.02

                                                          The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

                                                            Class-CGI-DateTime-0.02
                                                          • DateTimeクラスの記述量を減らす - Qiita

                                                            Help us understand the problem. What is going on with this article?

                                                              DateTimeクラスの記述量を減らす - Qiita
                                                            • Stop Using datetime.now!

                                                              One of my favorite job interview questions is this: Write a function that returns tomorrow's date This looks innocent enough for someone to suggest this as a solution: import datetime def tomorrow() -> datetime.date: return datetime.date.today() + datetime.timedelta(days=1) This will work, but there is a followup question: How would you test this function? Before you move on.... take a second to t

                                                                Stop Using datetime.now!
                                                              • Ruby - Bug #3670: DateTime#jisx0301 returns incorrect format for dates before the Meiji period - Ruby Issue Tracking System

                                                                For dates before the Meiji period, DateTime#jisx0301 returns the time part twice: $ irb -r date ruby-1.9.2-rc2 > DateTime.jd(2405161).jisx0301 => "M06.01.02T00:00:00+00:00" ruby-1.9.2-rc2 > DateTime.jd(2405159).jisx0301 => "1872-12-31T00:00:00+00:00T00:00:00+00:00" A patch to fix this is attached.

                                                                • PHPのDatetimeクラスはナノ秒を扱えない - そーだいなるらくがき帳

                                                                  表題の通りなのだけど下記のコードはerrorになる。 <?php $RFC3339Nano_format = '2019-12-24T19:00:30.123456789+09:00'; $datetime_object = new DateTime($RFC3339Nano_format); 実行結果はこのとおり。 $ php test.php PHP Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (2019-12-24T19:00:30.679012412+09:00) at position 20 (6): Double date specification in /tmp/test.php on line 3 これはPHPのDatetimeのコンストラクタの

                                                                    PHPのDatetimeクラスはナノ秒を扱えない - そーだいなるらくがき帳
                                                                  • C#でユリウス通日とDateTimeを相互変換する - MonoBook

                                                                    stackoverflowで見つけたのだがブラウザ閉じてしまってURLが分からなくなった。 DateTimeからユリウス通日(double型)を生成する。 public static class DateTimeExtensions { static readonly double JulianValue = 2415018.5; static readonly double ModifiedJulianValue = 2400000.5; public static double ToJulianDate(this DateTime date) { return date.ToOADate() + JulianValue; } public static double ToModifiedJulianDate(this DateTime date) { return date.ToOAD

                                                                    • dateutil - powerful extensions to datetime — dateutil 3.9.0 documentation

                                                                      dateutil - powerful extensions to datetime The dateutil module provides powerful extensions to the standard datetime module, available in Python. Installation dateutil can be installed from PyPI using pip (note that the package name is different from the importable name): Download dateutil is available on PyPI https://pypi.org/project/python-dateutil/ The documentation is hosted at: https://dat

                                                                      • DateTime::Format::ISO8601 - Parses ISO8601 formats - metacpan.org

                                                                        12 Feb 2012 06:53:38 GMT Distribution: DateTime-Format-ISO8601 Source (raw) Browse (raw) Changes How to Contribute Issues (11) Testers (12618 / 9 / 1) Kwalitee 92.60% Coverage License: perl_5 Activity NAME SYNOPSIS DESCRIPTION USAGE Import Parameters Methods Constructors Object Methods Class Methods Parser(s) FORMATS Conventions Supported via parse_datetime 5.2 Dates 5.2.1.1 5.2.1.2 5.2.1.3 5.2.1.

                                                                        • pandas.to_datetime — pandas 2.2.2 documentation

                                                                          pandas.to_datetime# pandas.to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False, utc=False, format=None, exact=_NoDefault.no_default, unit=None, infer_datetime_format=_NoDefault.no_default, origin='unix', cache=True)[source]# Convert argument to datetime. This function converts a scalar, array-like, Series or DataFrame/dict-like to a pandas datetime object. Parameters: argint, float, s

                                                                          • 複数行のヘッダー, 空白区切りのテキストデータをpandasで読み込み複数列にまたがっている日時データをto_datetimeに入れる - Qiita

                                                                            複数行のヘッダー, 空白区切りのテキストデータをpandasで読み込み複数列にまたがっている日時データをto_datetimeに入れる 自然科学分野の観測データって運用している大学や学会が独自に決めたフォーマットで保存されてることが多くて、例えば以下のような感じです: ABC... ...... ...... ...... ...XYZ YYMMDD hhmmss XXXXX YYYYY ZZZZZ TTTTT YYMMDD hhmmss XXXXX YYYYY ZZZZZ TTTTT YYMMDD hhmmss XXXXX YYYYY ZZZZZ TTTTT YYMMDD hhmmss XXXXX YYYYY ZZZZZ TTTTT 先頭から複数行にわたって観測点などの情報が記述されていて その後複数列に分けて日付と時間が記述されています。 最悪なやつになると YY MM DD hh m

                                                                              複数行のヘッダー, 空白区切りのテキストデータをpandasで読み込み複数列にまたがっている日時データをto_datetimeに入れる - Qiita
                                                                            • Django + MySQL 5.5 でモデルオブジェクトの datetime の値が生成時と生成後で変わる - 祢占堂

                                                                              class Diavolo(models.Model): ctime = models.DateTimeField(auto_now_add=True) っていう生成時に現在日時を自動的に保存してくれるやつを作るじゃないですか。 >>> d1 = Diavolo.objects.create() >>> d2 = Diavolo.objects.get(pk=d1.pk) >>> d1.ctime == d2.ctime Falseはい。 >>> d1.ctime datetime.datetime(2013, 10, 25, 13, 32, 25, 244575) >>> d2.ctime datetime.datetime(2013, 10, 25, 13, 32, 25)つらい。 MySQL を使っている場合、Django の ORM は models.DateTimeField を

                                                                                Django + MySQL 5.5 でモデルオブジェクトの datetime の値が生成時と生成後で変わる - 祢占堂
                                                                              • DateTime 型でもフォームで YYYY/MM/DD 形式にするには - わからん

                                                                                DateTime 型のカラム measurement_date を form_for の編集画面のフォームで YYYY/MM/DD 形式にするのに、f.text_field の :value で以下のように指定しました。 <%= f.text_field :measurement_date, placeholder: "YYYY/MM/DD", :value => l(f.object.measurement_date.try(:to_date)) %> l() 用に、ja.yml で以下のように設定しています。 ja: date: formats: default: '%Y/%m/%d' それから、f.object.measurement_date が nil だったときのために、一つ前のブログ記事で紹介した、ApplicationHelper#l を定義しています。新規登録時に f.o

                                                                                • https://rawedbedi.weebly.com/uploads/1/2/0/3/120360555/vb_net_datetime_remove_time.pdf