Questions tagged [date]

154 questions
0
votes
1 answer

SQL Converting strings to date

this has really baffled me for a few days and am seeking help. I am using SQL Server 2017. I am trying to handle strings from a free format field and either convert them to a date in the format of "dd/mm/yyyy" or if they are not in this format then…
0
votes
1 answer

I need to rename a file and insert a date

I'm trying to set a daily process to locate a file, rename it and insert the previous date in the file name. I want the file to be named "Filename_MMddyyyy.csv" with MMddyyyy being the previous day. I managed to rename the file but I'm a total noob…
0
votes
1 answer

Move files older than day

I am looking for some solution, where I have to move all the directories and files under the source directory to the destination a day before. I want to move the directories till yesterday but not today’s. find /temp/source/* -mtime +1 -exec mv -t…
nasa
  • 1
  • 2
0
votes
1 answer

PowerShell: How to check a recurrent week time interval?

I need to create a PowerShell script, able to collect some data at each minute. However, this script cannot run during the "technical windows", that are scheduled to occur at the same week days and time. (Ex. every tuesday from 19h00 to 23h00) This…
0
votes
1 answer

Linux DST - 25.10.2020 - change did not occur - old linux bug?

we have a strange problem on older linux kernel embedded devices that still uses /etc/tz and $TZ for setting the timezone and dst Our TZ variable has value: 'MET-1MEDT,M3.5.0,M10.5.0/03:00 And yesterday the time did not go BACK as it should. Was…
Lonko
  • 115
  • 1
  • 5
0
votes
2 answers

How to name a folder with today's date and time?

So i have this lil .bat setup @ECHO OFF echo %date% Copy D:\000Back\list.txt D:\111Back\ CD D:\111Back\ copy list.txt %date%_%time%.txt ECHO done PAUSE The second copy command never goes through, that might be because are there dots(.) in the date…
Csupi
  • 1
0
votes
1 answer

Redhat Enterprise Linux 7: How to disable DST - Daylight Saving Time

We have 16 Linux RHEL 7.5 servers in a cluster and servers are sync with crony service to NTP server We have two questions How to know if DST is configured on our servers? How to disable the DST on our Redhat Enterprise Linux 7 servers?
King David
  • 549
  • 6
  • 20
-1
votes
1 answer

Ubuntu shell: Get tomorrow's weekday

I have a shell script for backups and I need the Weekday of tomorrow. $Today = $(date +%a) #$Tomorrow = ?
Martin
  • 220
  • 3
  • 9
-1
votes
1 answer

find a date in a log file

I want to find a date in a log file and print from that date till the end of log file and that date is 5 days prior to the end of log file which is 27/Dec/2002 the log file is like this : 213.64.56.208 - - [01/Jan/2003:05:42:53 +0100] the whole…
matarsak
  • 37
  • 5
-2
votes
3 answers

Incorrect Ubuntu server time

I use 14.04.1-Ubuntu. When execute date in command line, I get time which about 1 min different comparing Greenwich Mean Time or other source. I synchronized it using sudo ntpdate -s time.nist.gov few months ago but it jumped away again. Why does it…
Justas
  • 221
  • 1
  • 6
  • 12
-2
votes
2 answers

date +"%s" returning empty string

I have a script with following lines: TIMESTAMP_END=$(date +"%s") FILE=${DIR}/recording_$TIMESTAMP_BEGIN-$TIMESTAMP_END.$EXT mv ${TMP_FILE} ${FILE} Script is running on Raspberry Pi and the TIMESTAMP_END variable is than used as a part of filename…
-2
votes
1 answer

Add date using echo without calculating

I should add the line to /var/spool/cron/crontabs/root on my ESXi: /bin/echo "0 3 * * 6 /ghettoVCB-master/ghettoVCB.sh -g /ghettoVCB-master/text.conf -f /ghettoVCB-master/text.list > /var/log/ghettoVCB-month-$(date +%m)-week-$((($(date…
A_buddy
  • 35
  • 2
  • 11
-2
votes
3 answers

crontab job is setting date wrongly

I need to set date and time in my server in order to make them synced always. I cannot use ntp inside my channel due to proxy issues. I've found this workaround. It works fine when I run it in command line interface. However when I add that command…
huzeyfe
  • 105
  • 3
-2
votes
1 answer

Set Debian Wheezy date to UTC

I'm not an expert in Linux servers, and I'd like to configure my server to use the UTC timezone, so there's no issue between the applications running on it. I don't really know how to do this. I ntp ntpdate (not sure whether it changes…
Julien
  • 99
  • 2
-2
votes
1 answer

Rounding by 5 minute interval

How do I round it to the next 5th interval? # date Sat Oct 13 22:09:25 IST 2012 # date '+%H-%M' 22-09 the output should be 22-10 When the minute is 58 it should round to 00 and not 60 though.
shantanuo
  • 3,579
  • 8
  • 49
  • 66
1 2 3
10
11