I need to have the date. The format of the time should be 2017-01-18T07:34:35Z I have tried this but it does not work:  import datetime i = datetime.datetime.now() date = %i.year "-" %i.month "-" %i.day "T" %i.hour ":" %i.minute ":" %i.second "Z"
18594
What is the module/method used to get the current time?
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?
120848
How do I convert a date string, formatted as "MM-DD-YY HH:MM:SS", to a time_t value in either C or C++?
11883
How can I format a date as dd/mm/yyyy or mm/dd/yy ?   Like in VB format("dd/mm/yy",now)  How can I do this in C#?
25101
When I create a new Date object, it is initialized to the current time but in the local timezone. How can I get the current date and time in GMT?
65271
I want to check the time      Eastern Daylight Time   Time zone in Washington, DC, USA (GMT-4)   Thursday, May 9, 2019, 8:11 PM   However,   $ TZ="EDT" date Fri May 10 00:12:25 EDT 2019   "EST" works properly  $ TZ="EST" date Thu May  9 19:13:11 EST 2019   What's the problem?
113875
I have 4 fields with Date Time values, and created a new field (Date type as well) which takes the most recent date from these 4 fields. I have tried using the Max python in the field calculator to populate this new field, but it does not use the most recent date from these 4 fields. Does this function not work with Datetime values, or is there another function for this that I am not able to find on these forums.   max([!field1!, !field2!, !field3!, !field4!])   I am on 10.5.  When I have two fields that have a date within the same month, it will not read the rest of the date correctly. (See picture attached)    When I run the following updated code it fails and says it is a syntax error.      With the current code, it reads the first number in the day to select the most recent date. (As shown below). It does not use the correct chronological format, even though the strptime format worked previously.
122501
The following code returns the time of the current date:  System.debug('Current date: ' + Date.today().toStartOfMonth());   Output:     2018-08-01 00:00:00   How to remove time from date?
101598
I am trying to implement the python logging handler TimedRotatingFileHandler. When it rolls over to midnight it appends the current day in the form YYYY-MM-DD. LOGGING_MSG_FORMAT  = '%(name)-14s &gt; [%(levelname)s] [%(asctime)s] : %(message)s' LOGGING_DATE_FORMAT = '%Y-%m-%d %H:%M:%S'  logging.basicConfig(             level=logging.DEBUG,             format=LOGGING_MSG_FORMAT,             datefmt=LOGGING_DATE_FORMAT             ) root_logger = logging.getLogger('') logger = logging.handlers.TimedRotatingFileHandler(&quot;C:\\logs\\Rotate_Test&quot;,'midnight',1) root_logger.addHandler(logger) while True:     daemon_logger = logging.getLogger('TEST')     daemon_logger.info(&quot;SDFKLDSKLFFJKLSDD&quot;)     time.sleep(60)  The first log file created is named Rotate_Test, then once it rolls over to the next day it changes the file name to Rotate_Test.YYYY-MM-DD where YYYY-MM-DD is the current day. How can I change how it alters the filename?
51823
When I use DateTime.Now I get the date and time from the server point of view. Is there any way to get the client date and time in ASP.NET?
17597
We are developing a C# application for a web-service client. This will run on Windows XP PC's.  One of the fields returned by the web service is a DateTime field. The server returns a field in GMT format i.e. with a "Z" at the end.  However, we found that .NET seems to do some kind of implicit conversion and the time was always 12 hours out.  The following code sample resolves this to some extent in that the 12 hour difference has gone but it makes no allowance for NZ daylight saving.  CultureInfo ci = new CultureInfo("en-NZ"); string date = "Web service date".ToString("R", ci); DateTime convertedDate = DateTime.Parse(date);               As per :     UTC/GMT Offset       Standard time zone: UTC/GMT +12 hours   Daylight saving time: +1 hour   Current time zone offset: UTC/GMT +13 hours     How do we adjust for the extra hour? Can this be done programmatically or is this some kind of setting on the PC's?
44860
I am looking to format a number like 188518982.18 to £188,518,982.18 using Python.  How can I do this?
14931
I have a time field in my shapefile that is formatted as HH:mm:ss.s It is a text field, and I want to convert it to a date so I can calculate time elapsed across rows (if there's a better way to do this let me know). Basically, each row is a point on a route, and I want to use the time field to calculate the amount of time elapsed between the first and last points on the route.   I tried using the convert time field tool, setting the input format as HH:mm:ss.s, and the output type as DATE. The output field however only shows values of 01/01/2001 for some rows and  for other rows.   time is the input field and time_c is the output field  I'm not sure what's going wrong here, here is what shows up in the geoprocessing results window:    I tried adding the date data to the field as well to make the format yyyy-MM-dd HH:mm:ss.s, but it still didn't work:
14437
I have a datetime coming back from an XML file in the format:     20080916 11:02   as in      yyyymm hh:ss   How can i get the datetime.parse function to pick up on this? Ie parse it without erroring? Cheers
65208
Is there a common way to get the current time in or with milliseconds?  There is os.time(), but it only provides full seconds.
106040
I've been using Javascript's Date for a project, but noticed today that my code that previously worked is no longer working correctly. Instead of producing Feb as expected, the code below produces March.   My code looks something like this:   current = new Date(); current.setMonth(current.getMonth()+1); //If today is Jan, expect it to be Feb now   This code worked everyday up until today. Is this a Javascript bug or am I going about this the wrong way?
1342
I need to get the first and last day of a month in the format YYYY-MM-DD given only the month and year. Is there a good, easy way to do this?