並び順

ブックマーク数

期間指定

  • から
  • まで

521 - 560 件 / 983件

新着順 人気順

datetimeの検索結果521 - 560 件 / 983件

  • JavaScriptでDATETIME型の日付を得る方法 | colori

    JavaScriptで直接PHP+MySQLのスクリプトとやり取りを行いたい場合に日付情報をDATETIME型に整形して送信したい場合があります。 その時の方法をご紹介します。 DateオブジェクトからYYYYMMDD…にして正規表現で変換 やり方は単純。 次のようなやり方でDATETIME型になるまで変換します。 Dateオブジェクトインスタンスを生成 getFullYear()等を使って、タイムスタンプ型(YYYYMMDDHHMMSS)の文字列を作る 正規表現を使って文字列の置き換え タイムスタンプ型の文字列を作らずに直接DATETIME型の文字列を作ることもできますが、タイムスタンプ型もあると便利ですよね? var dt = new Date(); var timestamp = dt.getFullYear()+ (String(dt.getMonth()+101).substr(

    • DateTime-Util-DayOfWeek-0.05 - DateTime Day of Week Utilities - metacpan.org

      The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

      • 標準の DateTime 書式指定文字列

        標準の DateTime 書式指定文字列は、単一の標準 DateTime 書式指定子文字で構成されます。この書式指定子文字は、カスタム DateTime 書式指定文字列を表します。書式指定文字列が最終的に定義するのは、書式設定操作によって作成される DateTime オブジェクトのテキスト表現です。空白を含む複数の英文字で構成される DateTime 書式指定文字列は、カスタム DateTime 書式指定文字列として解釈されるので注意してください。 標準の DateTime 書式指定子 標準の DateTime 書式指定子を次の表に示します。各書式指定子によって生成される出力の例については、「標準の DateTime 書式指定文字列の出力例」を参照してください。 書式指定子 名前 説明

          標準の DateTime 書式指定文字列
        • Going from twitter date to Python datetime date

          I am receiving twitter messages that are sent at a certain date in the following format from twitter: Tue Mar 29 08:11:25 +0000 2011 I want to store these dates in 'timestamp with time zone' field in postgresql with djangos DateTimeField field. When I store that string however I get this error: ValidationError: [u'Enter a valid date/time in YYYY-MM-DD HH:MM[:ss[.uuuuuu]] format.'] can I automatica

            Going from twitter date to Python datetime date
          • Datetime types - Amazon Redshift

            DATE Use the DATE data type to store simple calendar dates without timestamps. TIME TIME is an alias of TIME WITHOUT TIME ZONE. Use the TIME data type to store the time of day. TIME columns store values with up to a maximum of six digits of precision for fractional seconds. By default, TIME values are Coordinated Universal Time (UTC) in both user tables and Amazon Redshift system tables. TIMETZ TI

            • [ PHP ] DateTime で日時の比較と差分の抽出 – 偏差値40プログラマー

              ここでは、DateTime で管理された日時データの比較および差分を抽出するサンプルコードを掲載しています。 比較演算子で日時を比較する PHP 5.2.2 以降では、比較演算子での日時の比較ができるようになりました。 $date1 = new DateTime(); $date1->setDate(2010, 11, 10); // 日付を設定 $date1->setTime(12, 10, 11); // 時間を設定 $date2 = new DateTime(); $date2->setDate(2010, 11, 10); // 日付を設定 $date2->setTime(12, 10, 10); // 時間を設定 var_dump($date1 == $date2); // true ポイント 比較演算子は ‘ == ‘ を使うこと。’ === ‘ では、常に false がリタ

              • Pythonで2つのdatetimeオブジェクトの期間の1日ごとに処理をする - メモ置き場

                2つのdatetimeオブジェクトがあって、その期間の1日ごとに処理を行いたいケースがあったので、調べたところ以下のような感じに落ち着いた from datetime import datetime, timedelta start = datetime.strptime('201201', '%Y%m') end = datetime.strptime('201202', '%Y%m') def daterange(start_date, end_date): for n in range((end_date - start_date).days): yield start_date + timedelta(n) for i in daterange(start, end): # 処理 print i # => 2012-01-01 00:00:00 # => 2012-01-02 00

                  Pythonで2つのdatetimeオブジェクトの期間の1日ごとに処理をする - メモ置き場
                • Railsで"2013年9月21日"っていう文字をDateTime型に変換する - Qiita

                  require 'date' p DateTime.strptime("2013年9月21日", "%Y年%m月%d日") => #<DateTime: 2013-09-21T00:00:00+00:00 ((2456557j,0s,0n),+0s,2299161j)>

                    Railsで"2013年9月21日"っていう文字をDateTime型に変換する - Qiita
                  • 【Python】文字列と日付(datetime,date)の変換.例とstrp,strfの覚え方

                    日付から文字列(datetime→str) from datetime import datetime now = datetime.now() dt_str = now.strftime('%Y/%m/%d %H:%M:%S') # '2018/12/01 16:24:07' ISO形式だともっと楽! from datetime import datetime now = datetime.now() dt_str = now.isoformat() # '2018-12-01T16:23:01.339504' dt_str = now.isoformat(' ') # '2018-12-01 16:23:01.339504' dt_str = now.isoformat(' ', 'seconds')# Python3.6以降 # '2018-12-01 16:23:01' 日付と時間

                      【Python】文字列と日付(datetime,date)の変換.例とstrp,strfの覚え方
                    • MySQLのDatetime型で秒を切り捨て - サラリーマンから起業するリアル

                      MySQLのDatetime型は年月日と時分秒の情報を持っている。検索の際に日時分までで検索したい場合、SQLの中で秒を切り捨てて、where句で扱うTips(普通にdatetime型でイコールで条件指定すると、秒数まで入ってしまうため) select * from hoge where date_format( starttime, '%Y-%m-%d %H:%i' ) = '2009-05-11 22:15';日付や時間の書式設定は色々とあるので、検索条件の値によって変える http://logic.stepserver.jp/memo.cgi/archive/552/

                        MySQLのDatetime型で秒を切り捨て - サラリーマンから起業するリアル
                      • Using DateTime in LINQ to Entities

                        I have a PostgreSQL database that interacts with the program through Entity Framework Code First. Database contains a table "users" that has column "visit" type of DateTime. The application is described as; public class Users { ... [Required] [Column("visit")] public DateTime VisitDate ... } I trying to run this query; var rslt = context.Visitors.Where(v => v.VisitDate.Date == DateTime.Now.Date).T

                          Using DateTime in LINQ to Entities
                        • GitHub - 3846masa/lit-date: Light-weight, faster datetime formatter for modern browsers.

                          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 - 3846masa/lit-date: Light-weight, faster datetime formatter for modern browsers.
                          • PHP: DateTime::add - Manual

                            Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

                            • MySQL 5.6 DateTime Incorrect datetime value: '2013-08-25T17:00:00+00:00' with Error Code 1292

                              '2013-08-25T17:00:00+00:00' This is a valid iso-8601 datetime value, but it is not a valid MySQL datetime literal. On that point, the developer is incorrect. The documentation explains what ALLOW_INVALID_DATES does: Check only that the month is in the range from 1 to 12 and the day is in the range from 1 to 31. In other words, 2013-02-31 would be a permissible date if allow_invalid_dates is set. T

                                MySQL 5.6 DateTime Incorrect datetime value: '2013-08-25T17:00:00+00:00' with Error Code 1292
                              • htmlフォームのinput type="datetime-local"の初期値にmysqlのdatetime型の値を表示する

                                MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。

                                  htmlフォームのinput type="datetime-local"の初期値にmysqlのdatetime型の値を表示する
                                • 鈍足ランナーのIT日記 Tengでgroup byやDateTimeをWhere句に書く方法

                                  IT業界で働くおじさんです でも技術がありません。 でも、金持ちになりたいのでPerlの勉強をはじめました。やるしかない・・・ http://kinjouj.hatenablog.jp/category/Perl?page=1327244400 http://d.hatena.ne.jp/ktat/20111205/1323023021 http://d.hatena.ne.jp/ktat/20120111/1326211861 group by はうまくいったが、問題はWhere句のほう・・・ DateTimeオブジェクトをWhere句の中に書いてみたらエラーとなった。 my $dt = DateTime->now( time_zone => 'local' ); my ($entries, $pager) = $self->app->db->search_by_sql_abstract

                                  • php:datetime_ope [Ore Base]

                                    このページは削除されました。以前のリビジョンの一覧をチェックして、いつ・なぜ削除されたのか確認したり、過去の版にアクセスしたり、元に戻したり出来ます。

                                    • How to store Java Date to Mysql datetime with JPA

                                      Can any body tell me how can I store Java Date to Mysql datetime...? When I am trying to do so...only date is stored and time remain 00:00:00 in Mysql date stores like this... 2009-09-22 00:00:00 I want not only date but also time...like 2009-09-22 08:08:11 I am using JPA(Hibernate) with spring mydomain classes uses java.util.Date but i have created tables using handwritten queries... this is my c

                                        How to store Java Date to Mysql datetime with JPA
                                      • DateTime-Locale-1.42

                                        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-Locale-1.42
                                        • 6 Python datetime libraries

                                          There are a host of libraries that make it simpler to test, convert, and read date and time information in Python. Once upon a time, one of us (Lacey) had spent more than an hour staring at the table in the Python docs that describes date and time formatting strings. I was having a hard time understanding one specific piece of the puzzle as I was trying to write the code to translate a datetime st

                                            6 Python datetime libraries
                                          • PHP DateTime型 の分差を計算する

                                            PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

                                              PHP DateTime型 の分差を計算する
                                            • DATETIME型の値をPHP上でUNIX TIMESTAMP値に変換する方法 | colori

                                              追記:この記事に掲載されている関数を使うよりも、PHPに標準で備わっているstrtotime()関数を使ったほうがより簡単に実現できます。 参考記事はこちら。 あんまり需要がないかもしれませんが、ここに辿りついて来た方のために掲載しておきます。 引数が正当な日付かどうかのチェックは事前にお願いしますm(_ _ )m /** * DATETIME形式の値をUNIX TIMESTAMP値に変換 * * @param string $datetime DATETIME値 * @return integer DATETIME型じゃなければ0 */ function datetime2unixtime($datetime) { $regex = "/(d{4})-(d{2})-(d{2}) (d{2}):(d{2}):(d{2})/"; if (preg_match($regex, $datetim

                                              • Formatting DateTime object, respecting Locale::getDefault()

                                                Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams Create a free Team

                                                  Formatting DateTime object, respecting Locale::getDefault()
                                                • Ruby – DateTimeオブジェクトの時差を変更する « blog.udzura.jp

                                                  DateTime#new_offset を用いて、引数に「何日」ずれるか(時差を24で割った値)を突っ込めば良い。日本なら、Rational(9, 24)。 DateTime – Rubyリファレンスマニュアル: DateTimeで時差を指定する require 'date' d = DateTime.parse("Tue, 22 Mar 2011 03:30:45 +0000") #=> #<DateTime: 4714833881/1920,0,2299161> d.to_s #=> "2011-03-22T03:30:45+00:00" d.offset #=> Rational(0, 1) d = d.new_offset(9) #=> #<DateTime: 4714833881/1920,9,2299161> d.to_s #=> "2011-03-31T03:30:45+21

                                                  • DateTimeオブジェクトにUNIXタイムスタンプとタイムゾーンを指定した時の挙動に関する備忘録 - Qiita

                                                    DateTime オブジェクト生成時、第1引数に UNIX タイムスタンプを指定した場合、 第2引数にどんなタイムゾーンを指定しようとオブジェクトにはタイムゾーンが設定されない: % php -a Interactive shell php > var_dump((new DateTime('2013/02/20', new \DateTimeZone('Asia/Tokyo')))->getTimestamp()); int(1361286000) // なぜか日付がずれる php > var_dump((new DateTime('@1361286000', new \DateTimeZone('Asia/Tokyo')))->format('Y/m/d')); string(10) "2013/02/19" // date() だとずれない php > var_dump(date('

                                                      DateTimeオブジェクトにUNIXタイムスタンプとタイムゾーンを指定した時の挙動に関する備忘録 - Qiita
                                                    • SQLServerでDATETIME型を使用する際の注意点 | 株式会社アースリンク株式会社アースリンク

                                                      今回はSQLServerの「DATETIME型」について書いていきたいと思います。 なぜDATETIME型について書こうと思ったかといいますと・・・ ある期間のデータを取得したいと思いSQL文を作成したところ、当たり前に取得できると思っていたデータがなぜか取得されず… なぜ取得されなかったか調査をしましたところ、SQLServerの仕様をきちんと把握していなければ気づけない内容だったからです。 まずは、INSERTを行った場合からみていきましょう。 カラムにID(test_id)と日付(test_date)だけ用意した「test_tbl_01」に対して、以下のSQLでデータの挿入を行ってみます。 ちなみに日付はもちろん「DATETIME型」としています。 INSERT INTO test_tbl_01 VALUES ( '001' , '2019-08-26 18:12:44.413' )

                                                        SQLServerでDATETIME型を使用する際の注意点 | 株式会社アースリンク株式会社アースリンク
                                                      • Rails 6 adds before? and after? methods to Date, DateTime, Time, and TimeWithZone.

                                                        Rails 6 adds before? and after? methods to Date, DateTime, Time, and TimeWithZone. Mar 1, 2019 Rails 6 adds before? and after? methods to Date, DateTime, Time, and TimeWithZone. We read > and < as “greater than” and “less than” in ruby. before? and after? methods make the date/time comparisons much more human-readable. Before We can compare two date or time objects using > and <. Time.utc(2017, 3,

                                                          Rails 6 adds before? and after? methods to Date, DateTime, Time, and TimeWithZone.
                                                        • dateutil - powerful extensions to datetime — dateutil 2.9.0.post1.dev1+g0353b78 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

                                                          • DateTimePickerの代わりを探して(react-datetime componentの紹介) - Qiita

                                                            概要 DatePicker(日付選択コンポーネント)の情報は数多くありますが、時間まで表示するコンポーネント「DateTime(Picker)」の情報になると数少ないため、調べてまとめた情報を載せます。 環境 React.js(16.2.0) moment(2.22.2) react-datetime(2.16.2) DateTimePickerの代用を探し求めて 過去に、ReactではDateTimePicker(react-bootstrap-datetimepicker)というコンポーネントがあったのですが、 現在はDeprecatedされており、最新のReact.jsで動かそうものなら多数のエラーに阻まれて動かせない状態。(ECMAのバージョンなどが新しくなったことが理由で動かなくなったようです。) これの代わりになるものを探そう、ということで色々と模索してみました。 時間(秒)ま

                                                              DateTimePickerの代わりを探して(react-datetime componentの紹介) - Qiita
                                                            • DateTimeクラスのコンストラクタにタイムスタンプを渡す - Do You PHP はてブロ

                                                              うへっ、そうだったのか。知らなんだ。。。 One thing which the manual doesn’t show you is that you can also create using a timestamp, very useful if you are working with them already, perhaps you store datetimes that way or accept them as incoming parameters in that format. To do that you can use the following syntax: $datetime = new DateTime("@{$timestamp}"); 今見ると、PHPマニュアルにも書いてありますね。 PHP: DateTime::__construct - Manua

                                                                DateTimeクラスのコンストラクタにタイムスタンプを渡す - Do You PHP はてブロ
                                                              • DateTime::Format::Japanese で西暦○年を元号つきの日付に変換する - @kyanny's blog

                                                                こうすると漢数字のおまけつきで、今日の日付(平成二一年四月五日)が表示される。 DateTime::Calendar::Japanese と DateTime::Calendar::Japanese::Era というのもあって、最初そっちを見つけて適当に使ってみたけど平成22年になったりして、 POD を読んだらなんかちょっと最近のカレンダーとは違うみたいなことが書いてあって、 DT::F::J のほうを使え、と書いてあった。 #!/usr/bin/perl use strict; use warnings; use DateTime; use DateTime::Format::Japanese; use Perl6::Say; my $fmt = DateTime::Format::Japanese->new; my $dt = DateTime->today(time_zone =>

                                                                  DateTime::Format::Japanese で西暦○年を元号つきの日付に変換する - @kyanny's blog
                                                                • [Python] date と datetime オブジェクトの相互変換まとめ | 穀風

                                                                  [Python] date と datetime オブジェクトの相互変換まとめ [datetime オブジェクト、Unix time、文字列の相互変換まとめ](https://kokufu.blogspot.com/2018/12/python-datetime-unix-time.html) を書いたので、ついでと言っては何ですが date と datetime の変換についてもまとめてみました。 なお、掲載コードは以下のように import 済みとします。 ```python from datetime import datetime, date, time import pytz ``` ## 1. date と datetime の相互変換 ### datetime → date datetime から date に変換するには [dateteime.date()](https:/

                                                                    [Python] date と datetime オブジェクトの相互変換まとめ | 穀風
                                                                  • DataTable Select by exact DateTime

                                                                    I have a DataTable xData which has a DateTime column with millisecond accuracy, I need to extract the rows which match an exact time with milliseconds but cannot get the syntax correct. I've tried DateTime dt = timeStampList[i]; string str = dt.ToString("yyyy-MM-dd HH:mm:ss.fff"); DataRow[] result = xData.Select("TimeStamp2 = " + str); foreach (DataRow row in result) { Console.WriteLine("{0}, {1}"

                                                                      DataTable Select by exact DateTime
                                                                    • Convert string "Jun 1 2005 1:33PM" into datetime

                                                                      Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. Learn more about Collectives

                                                                        Convert string "Jun 1 2005 1:33PM" into datetime
                                                                      • How to format a DateTime in PowerShell

                                                                        I can format the Get-Date cmdlet no problem like this: $date = Get-Date -format "yyyyMMdd" But once I've got a date in a variable, how do I format it? The statement below $dateStr = $date -format "yyyMMdd" returns this error: "You must provide a value expression on the right-hand side of the '-f' operator"

                                                                          How to format a DateTime in PowerShell
                                                                        • 正規表現を使って、日付っぽい文字列をそれらしくdatetimeに押し込める - imait’s diary

                                                                          さくらインターネットのさくらのブログで驚いたのは、エントリーの公開日時を設定する際、ユーザーに日付をテキストで入力させるというところでした。私の常識では、ユーザーに直接入力させるなんて、危険極まりないからしてはならない。2009-03-15 12:15:00と入力してほしいのに、想像を絶するような、ありえない文字列を投げ込まれたりする。ところがさくらのブログでは、ユーザーに文字列として日付時刻を入力させるのです。驚いて、そして今はもうネットでブログなんてやろうというユーザーになると、これくらいの要求には軽く応えられるのだと、そういう時代になったことを理解したのでした。 というわけで、私の作っているK-enq.tdでも、日付時刻の設定は、ユーザーに文字列として入力してもらうことにしました。 で、それを正規表現でばらして、datetimeに押し込んで、datetime型のオブジェクトにしようと

                                                                            正規表現を使って、日付っぽい文字列をそれらしくdatetimeに押し込める - imait’s diary
                                                                          • 忘れたら読みたいPHPの時間(datetime)で使えるメソッド・使い方まとめ | 侍エンジニアブログ

                                                                            などの応用的な方法についても解説していきます。よく忘れるPHPの時間(datetime)処理を行うメソッドやその使い方についてまとめていますので、ぜひご覧になってください。 DateTImeクラスとは 日付や時間を扱った計算や操作を行うには、DateTimeクラスを使用します。DateTimeクラスはPHP5.2.0以降であれば使用可能です。DateTimeクラスは以下のように記述します。 $now = new DateTime(“日付”); 引数は指定しない場合は現在の日時を取得することができます。 フォーマットの指定方法(format) DateTimeクラスで日時のフォーマットを指定するにはformatメソッドを使用します。 public string DateTime::format ( string $format ) formatメソッドは第一引数にフォーマット文字列を指定しま

                                                                              忘れたら読みたいPHPの時間(datetime)で使えるメソッド・使い方まとめ | 侍エンジニアブログ
                                                                            • Pandas: Convert Timestamp to datetime.date

                                                                              I have a pandas column of Timestamp data In [27]: train["Original_Quote_Date"][6] Out[27]: Timestamp('2013-12-25 00:00:00') How can check equivalence of these objects to datetime.date objects of the type datetime.date(2013, 12, 25)

                                                                                Pandas: Convert Timestamp to datetime.date
                                                                              • DateTime::Format::Strptime - Parse and format strp and strf time patterns - metacpan.org

                                                                                NAME DateTime::Format::Strptime - Parse and format strp and strf time patterns VERSION version 1.79 SYNOPSIS use DateTime::Format::Strptime; my $strp = DateTime::Format::Strptime->new( pattern => '%T', locale => 'en_AU', time_zone => 'Australia/Melbourne', ); my $dt = $strp->parse_datetime('23:16:42'); $strp->format_datetime($dt); # 23:16:42 # Croak when things go wrong: my $strp = DateTime::Forma

                                                                                • 【MySQL】DATETIMEとTIMESTAMPの違いや2038年問題などについて解説。 | ポテパンスタイル

                                                                                  【MySQL】DATETIMEとTIMESTAMPの違いや2038年問題などについて解説。 2019.12.31 データベースを設計するにあたり日付というのはかなりデリケートな部分になります。 後述しますが、間もなくきたるべき時を迎え、諸問題が発生する可能性を秘めたデータベースも数多くあるはずです。 そこで今回は日付(DATETIME)について解説してみたいと思います。 日付を扱う上で日付に関するデータ型というのはいくつかありますが、よく似ているのがこの二つのデータ型です。 しかし実は似て非なるもので、いくつかの大きな違いがあります。 格納可能な範囲の違いについて もう一つの大きな違いは格納できるデータの範囲です。 リファレンスマニュアルによると、DATETIMEのサポート有効範囲は”1000-01-01 00:00:00″から”9999-12-31 23:59:59″までとなっています。

                                                                                    【MySQL】DATETIMEとTIMESTAMPの違いや2038年問題などについて解説。 | ポテパンスタイル