For questions concerned with obtaining, manipulating or presenting the calendar date.

learn more… | top users | synonyms

41
votes
8answers
258k 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@...
23
votes
2answers
2k 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, "...
22
votes
7answers
36k 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. Any ideas how to display the time ...
20
votes
3answers
28k 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?
16
votes
3answers
2k 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. ...
16
votes
2answers
18k 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 ...
15
votes
5answers
20k 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 ...
15
votes
10answers
59k 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). ...
15
votes
3answers
3k 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 ...
14
votes
3answers
32k 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?
13
votes
1answer
48k 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?
12
votes
12answers
95k 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 ...
11
votes
2answers
12k 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)...
10
votes
4answers
8k 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 ...
10
votes
4answers
3k 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 ...
8
votes
4answers
12k 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 ...
8
votes
4answers
3k 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 ...
7
votes
5answers
10k 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?
7
votes
1answer
895 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
1answer
4k 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 ...
6
votes
8answers
40k 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=%...
6
votes
1answer
8k 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 ...
6
votes
1answer
847 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?
5
votes
1answer
12k 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 ...
5
votes
3answers
18k 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 ...
5
votes
2answers
82 views

Formatting Dates

I have the following formula: =D56&" "&"("&D57&" Days"&")" D56 has a date within the cell. I want to format the date like 5/5/2011 but I'm not sure how to do it.
5
votes
1answer
24 views

Add date watermark to jpg images

I am attempting to add a watermark to images that contains the date. I am not having any trouble putting text on images but as soon as I try and put a date I get unpredicted results. convert -...
5
votes
1answer
7k 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
1answer
74 views

Historical reason why date's %h and %b format codes produce the same output?

Is there a historical reason why date's %h and %b format codes produce the same output? $ echo $(date +\%h) Mar $ echo $(date +\%b) Mar Other redundancies exist in date format codes as well, but ...
4
votes
4answers
702 views

How to use “date” to print tomorrow's day of the week

On CentOS 6 Linux I use date +%a in several cronjobs and scripts to generate logfile names like myprog-Tue.txt and this works well for me since many years. But now for one program I need to delete ...
4
votes
2answers
3k 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, I ...
4
votes
2answers
201 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....
4
votes
1answer
5k views

Setting file creation date in Mac OS X

I need a script to set the creation date to the modification date for a bunch of files created by my sound recorder - any way to do this? Running Mac OS X 10.4.11
4
votes
1answer
8k views

Grouping dates by week in a Pivot Table

I am trying to create a Pivot table to report on data that comes from an Access Query. Basically the data that comes back is in the following format: TradeDate StoreID DeptCode ReasonCode ...
4
votes
1answer
1k 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). ...
4
votes
4answers
989 views

Is it possible to know when was the last update of a dynamic (PHP/ASP) web page content?

Update: the question was not clear enough.... I have found a bookmarklet that give me the date of a web page last update: javascript:alert(document.lastModified) But it's not very effective ...
4
votes
1answer
76 views

Word mixing up dates (1923 becomes 2023)

Using windows 7 I find that MS-Word is reffering to the system settings to interpret data. In one of the apps I use, a date is exported with a 2 digit year, even though the setting in that application ...
3
votes
3answers
4k views

Is there a way to find out when some web page was made?

Nope, it's a fine title ... Is there a way to find out when some web page was made ? (Example: I often, before buying equipment, search through reviews ... before shortening the list of "candidates"...
3
votes
2answers
461 views

Display day of week in Taskbar without impacting Excel

With Windows 8.1, I would like the current day of the week (or abbreviation thereof) to show in my taskbar along with or alongside time and date, without ramifications for Excel and, preferably, no ...
3
votes
1answer
5k 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 ...
3
votes
2answers
4k views

How to make an application detect if system time has changed in Linux

I need to write a small application which needs to detect if the system time is changed by an another application/user and perform some action as soon as it is detected (maybe log the data that time ...
3
votes
1answer
2k views

Formula to add X months to a date?

How can I add X months to an existing date in iWork Numbers?
3
votes
2answers
2k views

Set relative time using command line

Using something similar to the date command, is it possible to set the date and time relative to 'now'? So instead of something like date +%T -s "10:13:13" something like date -s +1h or something ...
3
votes
1answer
5k views

Importing specific date format to Excel from Microsoft SQL Server

I've already asked the question at: StackOverFlow and got sent to this place here. I'm importing dates from a German SQL Server table into a German Excel file via the built-in Excel connection tool. ...
3
votes
1answer
334 views

Auto include save date in filename?

Can I set an option to automatically include the save date in an MSWord filename?
3
votes
1answer
268 views

What was scientifically shown to support productivity when structural organizing/accessing file and folders? [closed]

My Personal Information Management problem I have gathered terabytes of data but it has became a habit to store files and folders to the same folder, that folder could be kind of seen as a Inbox ...
2
votes
4answers
301 views

How to cd to a newly created dir?

cd "$(mkdir -v "$(date -R)"|sed s+.`(.*)'.*)" This is meant to create a dir named $(date -R). I could simply cd $(date -R), but the culprit is the date could change since the previous command was ...
2
votes
3answers
36k 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?
2
votes
1answer
4k 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 ...
2
votes
3answers
854 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 ...