I have a variable called created = created[1],created[2], created[0] that outputs a date in the form of [(12, 11, 2019)]. I want the date to be formatted like 12/11/2019. How would I got about changing the formatting in python. created = time.localtime(user.created / 1000) created = created[1],created[2], created[0]
31399
This is my code:  import datetime today = datetime.date.today() print(today)   This prints: 2008-11-22 which is exactly what I want.  But, I have a list I'm appending this to and then suddenly everything goes "wonky". Here is the code:  import datetime mylist = [] today = datetime.date.today() mylist.append(today) print(mylist)   This prints the following:   [datetime.date(2008, 11, 22)]   How can I get just a simple date like 2008-11-22?
54518
I would like to use the  package to format date(time) ranges.  For example, \DTMdaterange{2017-08-05}{2017-09-10} would output 2017-08-05/09-10 in ISO format, or something like August 5 to September 10, 2017 in US English.  I looked into implementing it myself, but find it a bit hard.  Is there any package that already includes this functionality aside from ?  I thought  might be a good candidate, but cannot find anything useful (I am mostly interested in formatting dates; times are not necessary).
113471
I'm working on making a spreadsheet in Google Sheets, and I'm attempting to have a column of names and then a column of dates adjacent to it.   I'd like to set up some sort of conditional formatting that checks if a cell's date has past or not, and if it has, formats the corresponding cell in the name column with a strikethrough.      Names  |  Dates | Etc. Name Here |  Date  | --- Name 2    |  Date2 | ---   So if the second date listed under "Dates" already passed (aka 1/10/16 as opposed to 2/19/16 compared to today's date, 1/19/16), then the second name listed under "Names" would appear formatted with strikethrough (like you had crossed it out).
90847
I want to make a date and time updated field as I edit an attribute field in this format yyyy-mm-dd 00:00:00 (= 2016-05-08 11:04:00) - my local date/time. The data is in a QGIS 2.14 shapefile and vector lines as screenshot below. When a feature as NULL in the 'name' field, I want to enter a name for the road and the 'mod' field must receive de modified date/time like '2016-05-08 15:16:00'. I already tried some options and failed. I need help to start from beginning.  I create a new field, date/time type, but stays with NULL value after I edited, in the &quot;name&quot; field, or the feature itself. I used too, the expression now(), but stays with NULL value after I edited.  Note: the date seen there, 2016-04-14 is the first value created with &quot;Field Calculator&quot;.  I am using QGIS 2.14.
119405
Does anyone know how to convert string time formats in ArcMap v10.2 from 12-hour to 24-hour using a simple query in the Field Calculator? i.e. NO Python, NO editing in Excel, NO changing my Windows PC settings, etc...  This is a successful calculation I used (which I found on a discontinued forum) to convert my dates from MM/DD/YYYY to YYYY/MM/DD:  year([DateFld]) &amp; "/" &amp; Month([DateFld]) &amp; "/" &amp; Day([DateFld])  Perhaps there is some sort of modification that I could make to the above calculation that would change my times to 24-hour?  I've searched for an answer everywhere and played around with it without any luck, but I would like for the times to be in h:mm:ss format.  Forgot to mention that this is a regular shapefile, not part of a GDB.
83823
I need to display date and time in desired format in Unix/ Linux. My desired format is: dd/mm/yyyy hh:mm:ss:ms in Unix or Linux. I got close using the following command:  echo $(date +%x_%r)   This returns:  08/20/2012_02:26:14 PM   Any suggestions?
51244
I'm looking for an easy-to-read way to format time and date. The time and date will be displayed in a piece of software, and will be used to tell when an event occurred. For example,      "A temperature spike occurred at [t&amp;d]".    Shorter versions of the time and date will be displayed where appropriate. They will use the format YYYY/MM/DD HH:MM:SS UTC±HH:MM.  Given the software user might be in a different timezone, I feel that using natural language (and saying an event occurred 'Yesterday' or 'Last week') is not ideal. I would like to know what other formats of time and date are standard. Currently I hypothesize that the two formats will be:    "Commonwealth" format: DAY, DD MON YYYY at HH:MM:SS (UTC±HH:MM) eg.      Tue, 30th July 2013 at 15:42 (UTC+13)  US format: DAY, MON DD YYYY at HH:MM:SS (UTC±HH:MM) eg.      Tue, July 30th 2013 at 15:42 (UTC+13)    DAY is a 3-letter abbreviation for the day  MON is a 3-letter abbreviation for the month unless the month has 4 letters in which case, just use that  The year is optional and will default to the current year if not specified    Are my date formats correct and good natural language? Or are there better ones?  Thanks in advance!
69657
I have a shapefile with date in a string field. I create a new field with date type and use the calculator to make the conversion. But the result only provide the date part, the time part is removed. Even when the preview show the correct conversion.  Here you can see the original string field time and the result date time2. And the use of the conversion function to_datetime() and the preview result at the end    If you go to the layer properties you can change the edit mode to date/time. Then if go to the data and try to edit time2 you get the current date/time. So is possible save date and time in the same field. But the update tool still doesn't work as expected      As J.R said. Even when you can change QGIS edit to allow Date/Time the save to shapefile will discard the time.
70367
I spent 3 hours trying to write a command to format a time (duration) expressed as a floating number (in seconds) in a nice form as follows:  if the time is &lt; 60 write as a float with 3 decimals (i.e. milliseconds)  else let h,m,s be the hours, minutes and seconds corresponding to the time      if h=0 then write as m:ss (ss always with 2 digits, m can have only 1)      else write h:mm:ss (mm and ss with 2 digits, h can have only 1)   So 1.25678 gives 1.256, 125.35 gives 2:05, 18249 (which equals to 5*3600+4*60+9) gives 5:04:09.  I tried several packages for the comparison/formatting. No success. Can someone help me ? Thanks !
87792
I asked  yesterday, approximately 18 hours ago ("2011-12-13 20:24:03Z" according to the hover text), and it's still being displayed as "today".  I assume the "Z" in the timestamp refers to Zulu time, so I , and the date (2011-12-14) differs from the timestamp on the question.  I don't pretend to understand all of the complexities when converting time zones, but I thought it was strange enough to report. If it matters at all, I'm in US-Eastern.
26496
I want to display dates in the format: short day of week, short month, day of month without leading zero but including "th", "st", "nd", or "rd" suffix.  For example, the day this question was asked would display "Thu Oct 2nd".  I'm using Ruby 1.8.7, and  just doesn't seem to do this.  I'd prefer a standard library if one exists.
99745
Is there a way to display previous and current year with dynamic text?    If so, what is the formatting?   I'm using ArcMap 10.0
49490
I have a tab delimited file where each record has a timestamp field in 12-hour format:     mm/dd/yyyy hh:mm:ss [AM|PM].   I need to quickly convert these fields to 24-hour time:     mm/dd/yyyy HH:mm:ss.   What would be the best way to do this? I'm running on a Windows platform, but I have access to sed, awk, perl, python, and tcl in addition to the usual Windows tools.
8889
Is there a way to format a UTC time into any arbitrary string format I want in java?  Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me.  Is there a way to do this?
111856
How do you format the date time to just date?   For example, this is what I retrieved from the database: 12/31/2008 12:00:00 AM, but I just want to show the date and no time.
3903
When I paste a date into Excel 2010 in the format "2012-12-07 00:00:00.000" I'd like it to be displayed by default as "2012-12-07", but it is actually displayed as "00:00.0".   I know I can work around this by prepending a ' or changing the cell format, but I'm interested in changing the default format.  An approach that almost works is going to Control Panel->Region and Language->Long Time format and changing it to something like "h". This results in Excel displaying the dates I paste in as "2012-12-07 00:00:00.000", but screws up times displayed outside of Excel.  The dates I'm pasting in are from SQL Server.
52553
I have a .csv file contains   Data1|Data2|10/24/2017 8:10:00 AM   I want to change date and time format of column 3 as following:  From 10/24/2017 8:10:00 AM (12-Hour) to 20171024 08:10:00(24-hour).  Not using -d