Questions tagged [date]
For questions concerned with obtaining, manipulating or presenting the calendar date.
511
questions
81
votes
11
answers
562k
views
How to set current time on Linux?
Why is the output of the following commands different?
root@vmi2115:/var# hwclock
Sun 26 Jun 2011 01:21:38 PM CEST -0.273230 seconds
root@vmi2495:/var# date
Sun Jun 26 15:21:39 CEST 2011
root@...
65
votes
22
answers
789k
views
Unable to get Excel to recognise date in column
I constantly have problems working with dates in Excel, I must be doing something wrong but I don't understand what.
I have a spreadsheet, exported from our exchange server, that contains a column ...
48
votes
8
answers
86k
views
Store the output of date and watch command to a file
I am a newbie to linux and I am trying to watch a command and try to log it into a file. I tried
watch -t -n 10 "(date '+TIME:%H:%M:%S'
; ps aux | grep "pattern" | wc -l)" >>
logfile
and am ...
39
votes
4
answers
97k
views
How to display Unix time in the timestamp format?
I'm looking for a way to display my time in Debian Linux as a timestamp, e.g.
1279628325
I can't find any options to do that with the date command. Any ideas?
38
votes
4
answers
51k
views
How do I parse a nonstandard date format in Excel?
I have a column of date-like string values in the format yyyy-mm-dd, such as 2011-Sep-13. I need to convert these to Excel date serial numbers so that I can use them in formulas.
DATEVALUE isn't ...
35
votes
8
answers
56k
views
Timezone conversion by command line
I know about http://www.timeanddate.com/worldclock/converter.html
I can't figure out how to query http://www.google.com in a sane natural format like "5pm BST in PST".
Or do I have to write such an ...
33
votes
3
answers
16k
views
How to insert the date into vim
In vim you can execute comands with "!". You can combine that with "r" to insert the output into your current buffer.
:r!date
Fri Jul 20 09:39:26 SAST 2012
will insert the date into a file.
...
31
votes
9
answers
58k
views
Windows 7 - display date using small icons
I recently upgraded to Windows 7 and need the date displayed with the time. This works, but only if I use large icons in the taskbar settings which is quite ugly.
How do I display the time and date ...
30
votes
3
answers
55k
views
how to add a day to date in bash?
For example, I have date: 4 August 1993 and I want to add 348 days to it, how can I do it in bash?
29
votes
8
answers
34k
views
How to add month to date in LibreOffice calc
This seems like an obvious question.
I have a date column, and I want to create a formula to increase it by one month for each column.
10/2013, 11/2013, 12/2013, 1/2014, 2/2014, ...
How do you add ...
29
votes
3
answers
28k
views
How do I pipe output to date -d "value"?
I have a date like 2014-01-30 05:04:27 GMT, and if I run date -d "2014-01-30 05:04:27 GMT", the output is in my server's timezone (Thu Jan 30 16:04:27 EST 2014).
With the use of grep and cut,...
28
votes
3
answers
7k
views
Why are Excel weekdays wrong for 1900?
This question is based on the observations of AdamV in his answer on How do I get the day name into a cell in Excel?
When A1 has the value 2009-08-01, then:
=WEEKDAY(A1) will obtain 7
=TEXT(7, "...
23
votes
9
answers
143k
views
How to get the date in a batch file in a predictable format?
In a batch file I need to extract a month, day, year from the date command. So I used the following, which essentially parses the Date command to extract its sub strings into a variable:
set Day=%...
19
votes
2
answers
4k
views
Excel week number inconsistent results
I am using a spreadsheet that includes the week number for a particular date. After some research, I found a function ISOWEEKNUM() that I could apply to a column of dates and this appeared to work ...
19
votes
12
answers
80k
views
Windows 7 system tray date display not appearing
I'm using Windows 7 RC and for some reason, the date won't show at all on my system tray. It used to for a while, but one day it just stopped (I didn't even notice it until someone pointed it out).
...
16
votes
3
answers
7k
views
Is it possible to determine when a NTFS partition was created?
We have a client where it would be very useful to determine WHEN a drive was a initialized or an NTFS partition created. Is there a timestamp value somewhere? If anyone could shed any advice it ...
16
votes
1
answer
72k
views
Adding Weeks to Current Date in Excel 2007
How can a given number of weeks be added to the current date in Excel 2007? For example, if I need to add 12 weeks to the current date, 12/6/2010, how can that be done?
15
votes
2
answers
15k
views
In Windows 7, how to show day name in system tray clock?
Without installing third-party software, how do I display the day in the clock in the lower-right system tray clock in Windows 7. For example: "Tuesday" (in addition to normal time and date display)...
15
votes
5
answers
11k
views
Is there any software or hardware which lets you stop, slow down, speed up or even reverse time?
Obviously I'm talking about time in terms of the PC clock rather than real time.
We were testing an application we've developed at work by setting the clock forward and back to simulate different ...
14
votes
2
answers
18k
views
Linux date command not working
I can't seem to get the terminal command 'date' working. Here is an example of the commands I gave in terminal:
$ date
Wed Oct 7 17:17:38 EDT 2015
$ sudo date --set="20151007 18:17:00"
Wed Oct 7 18:...
12
votes
9
answers
24k
views
How to convert from day of year and year to a date YYYYMMDD?
I'm looking to go from day of year (1-366) and year (e.g. 2011) to a date in the format YYYYMMDD?
12
votes
1
answer
35k
views
Put date into backup .tar.gz filename
I'd like to run a simple tar command to backup my website directory. It will run through cron, but I want to be able to put the time at which the backup was made as the filename. I don't really mind ...
12
votes
1
answer
19k
views
Open Office Calc: Convert a date to timestamp
I have a column with dates in M/D/Y like this:
8/8/2007
8/9/2007
8/10/2007
8/13/2007
8/14/2007
8/15/2007
8/16/2007
I would like to convert them to a unix timestamp (in a new column). Would anyone ...
11
votes
2
answers
11k
views
Wrong date created for files in Windows when copying files, if the file has already existed
I'm having a problem when copying files (or creating new files) on Windows 7. If I copy a file, I expect the date created to be correct, but sometimes it's not. Usually it works, but here is an ...
11
votes
2
answers
21k
views
Is there any way to view dates of changes to Windows registry keys/values?
Is there any sort of date tracking that is done or viewable in the Windows registry, such as seeing the date when X key was created, or Y key was modified, similar to how file systems track?
I'm ...
10
votes
4
answers
15k
views
Wrong week number in Outlook
I was stupefied to see this screen in Outlook 2013:
As per ISO 8601:
The ISO 8601 definition for week 01 is the week with the Gregorian
year's first Thursday in it. The following definitions ...
9
votes
3
answers
5k
views
Calculating the number of days between two dates in Excel
I consider 7 days to be a week,
so if I look at 1 January 2019 - 7 January 2019,
I would say that is 7 days.
But often I seen when people are calculating the number of days between two dates or age ...
9
votes
4
answers
5k
views
Put a text in front of every new line that a program prints to stdout
So I want to do some logging and therefor, want to put a date in front of a bash script's output. The problem is that is has multiple lines of output. I am able to only put the date before the whole ...
8
votes
3
answers
72k
views
How to change the date of Linux to UTC/GMT +1?
I need to change the date of my system. I'm running a Linux CentOS 5.6.
# date +%Z
UTC
# date
Thu Oct 6 11:42:45 UTC 2011
How do I change the hour to be UTC/GMT +1?
8
votes
3
answers
77k
views
How to convert UTC to typical date format in Excel?
I have this UTC column called Timestamp. It looks like this.
2019-06-27T23:01:12.1024861Z
How do I convert it so it looks like this in Excel?
06/27/2019 23:01:12
If there is a formula that would ...
8
votes
3
answers
61k
views
How to get the dates of the current monday, wednesday and friday of the current week in excel?
I'd just like a simple formula to return the date for the current Monday, Wednesday and Friday based on the current date.
So, I would like to see it like:
Cell A1 I'd like (Today is Monday January ...
8
votes
1
answer
2k
views
Firefox date format
I want to display dates in FireFox as DD.MM.YYYY, despite the fact that I'm using the en-us version of FireFox, which causes the date to be in MM/DD/YYYY format. I would like to continue using the en-...
8
votes
2
answers
13k
views
How can I get the date in a locale independent format in a batch file?
I'm trying to read a file that contains a date in the filename.
The problem is when the date format is US in the system: mm/dd/yyyy it does not working .
For this format : dd/mm/yyyy it works as ...
8
votes
2
answers
5k
views
Creating a column of working days in LibreOffice Calc
In LibreOffice Calc, I would like to create a column of working days, like Date from below:
Date
Day of week
2012-01-30
Monday
2012-01-27
Friday
2012-01-26
Thursday
2012-01-25
Wednesday
2012-01-...
8
votes
2
answers
16k
views
Remove 3rd row with day of week from Windows 10 taskbar
After a recent update my Windows added a 3rd row to the taskbar, showing the full day of week. I don't need it since I have one as part of the date.
Moreover, the 3rd row made my date disappear as ...
7
votes
1
answer
1k
views
Pull a user-defined season from a date?
So I want to pull a season from a date. I have a seasons table and it goes a little like this.
Jan = Low (low/mid/high = season)
feb = low
mar = low
apr = mid
may = mid
jun = high
jul = high
aug = ...
7
votes
1
answer
11k
views
Formula to add X months to a date?
How can I add X months to an existing date in iWork Numbers?
7
votes
4
answers
60k
views
Convert three letter month abbreviation to number?
Is there an excel function for converting a three letter month abbreviation (such as FEB, APR) to a number? I've been using a mapping table and then using v-lookup from there, but curious if there's a ...
7
votes
1
answer
9k
views
Using 'date' in bash shell to add 5 minutes to a defined time with high precision
I’m trying to keep the high (millisecond) precision of my time, shown in my $TIME variable.
I’m confused by the output I get, because I try to add 5 minutes, but it looks like it's subtracting 8 ...
7
votes
1
answer
2k
views
How to search in windows according to access date
I have found only according to "date modified" and not "access date"
I haven't found any ways of sorting this correctly. Maybe I should use third party software?
6
votes
4
answers
8k
views
Get DayName from Date in OpenOffice Calc?
I am having difficulty getting the day name from OpenOffice Calc. I am able to get the day Number representation from a date with the following
WEEKDAY("2008-06-14"; 1)
which returns
7
As we ...
6
votes
1
answer
5k
views
How can I fix a date that changes by 4 years and 1 day when pasted between Excel workbooks
In Excel dates are represented internally by a floating point number where the integer part is the number of days since "some date" and the fractional part is how far into that day (hence the time). ...
6
votes
4
answers
9k
views
Need today's date as default value in a form field in Libre Office
New to Libre Office Base.
I've found how to set the default value in a table to the current date. Now I need to have the current date show up in the corresponding field in a form.
I have tried ...
6
votes
1
answer
11k
views
How could I change file creation/modification date from filename? [closed]
I have a bunch of pictures that each have its creation date in the filename with this format: IMG-YYYYMMDD-WAXXXX.jpg
but when moved from smartphone internal memory to sd card, all the pictures got ...
6
votes
2
answers
16k
views
linux "date -s" command not working to change date on a server
date +%T --set="12:19:06"
12:19:06
date
Mon Nov 26 12:37:32 SAST 2012
date 112613232012
Mon Nov 26 13:23:00 SAST 2012
date
Mon Nov 26 13:42:27 SAST 2012
I have tried many different forms of this ...
6
votes
1
answer
12k
views
How do I get the current date according to an NTP server without setting it locally?
I want to get the current date and time according to a remote NTP server, using Linux. I don't want to change the local time as a result; I just want to get the remote date, adjusted for the local ...
5
votes
6
answers
6k
views
What other archive formats save Date Created and Date Accessed?
Compressing Files
When zipping files with Windows' built-in zip utility, it will not save the Date Created in the archive:
Also, I just found a bug where Windows will not save the Date Modified of ...
5
votes
4
answers
2k
views
No solution for Thunderbird date format
I run Linux Mint 19.2 and Thunderbird 60.8.0 (July 2019). I am trying to change the UI to display the dates in a reasonable date format called ISO 8601, and for that I tried setting LC_TIME=en_DK.UTF-...
5
votes
2
answers
537
views
Manipulating datestamp string consistently with date format %Y%m%d
I need create log files that are essentially date stamps with prefix yp_ and suffix .log, and a manipulated day number:
$ touch yp_$(echo "$(date +%Y%m%d)-10" | /usr/bin/bc -l).log
$ ls
yp_20150912....
5
votes
1
answer
11k
views
Timezone setting in Linux
I'm setting timezone GMT+6 on my Linux machine by copying the zoneinfo file to /etc/localtime, but the date command is showing the time UTCtime-6. What is the reason for this behaviour?
I'm assuming ...