Looking for Function or tips to extract Image Access Date and time in matlab - matlab

I have an array of images in an folder,and i would like to read them in the order they copied in the folder i.e. for example there are three images if 1st image copied at 7.15 PM second at 7.45PM and third 7.55PM, i would like to read image which copied first in my folder in terms of time and date.? so how to sort image in that order? have any idea.
On the other hand,if right click on any image,and go to proporties,you will find three types of date i.e. Created date and time, modified date and time and access date and time. i would like to extract the access date and time of any image in matlab? how to do that? pls guide.

I am not sure if there is a way to find the atime with a MATLAB function, you might have to do a system call. On most unix-like systems it would look something like this.
>> [status result] = system('ls -trlu')

I don't know if it's possible to get the "access" date, but you can get the "modified" date with the dir function. By doing:
d = dir('directory');
time = d.date;
You then need to extract the relevant information from the string output of d.date and sort it accordingly.

Related

TadvGridFilterPanel on TadvStringGrid filters dates wrong

I've got a TAdvStringGrid connected to a TAdvGridFilterPanel. The grid contains several columns of which 4 are dates. The locale of my PC is 'nl-NL' (Dutch). Date format in The Netherlands is 'dd-mm-yyyy'. When I filter dates it doesn't filter correctly. Things I tried that did not help:
In the OnGetFormat returned the ssDate for date columns
Fiddled arround with FormatSettings (local and global) with DateFormat and DateSeparator. This did solve some of the display problems. Date were display as '31/12/2000'. After changing the FormatSettings this changed to '31-12-2000'. But it's not nice to use the global FormatSetting so discarded that solution.
Tried to find an event that fires on compare. If it exists, I didn't find it.
In other words. Or I'm doing something wrong or there's a bug in the TMS code. Any idea's?

Google Sheets - DATE format not working on imported Date in TEXT format

I text based .csv file with a semicolon separated data set which contains date values that look like this
22.07.2020
22.07.2020
17.07.2020
09.07.2020
30.06.2020
When I go to Format>number> I see the Google sheets has automatic set.
In this state I cannot use and formulas with this data.
I go to Format>number> and set this to date but formulas still do not see the actual date value and continue to display an error
Can someone share how I can quickly activate the values of this array so formulas will work against them?
I would be super thankful
Where the date are in column A, starting in cell A1, this formula will convert to DATE as a number, after which you apply formatting to Short Date style.
=ARRAYFORMULA(IF(A1:A="",,DATE(RIGHT(A1:A,4),MID(A1:A,4,2),LEFT(A1:A,2))))
Hopefully(!) the dates stay as text, otherwise Google Sheets would sometimes detect MM/dd/yyyy instead of dd/MM/yyyy, and you won't be able to distinguish between July 9th and September 7th in your example.
Solution #1
If your locale is for instance FR, you can then apply
=arrayformula(if(A1:A="";;value(A1:A)))
solution#2
you can try/adapt
function importCsvFromIdv1() {
var id = 'the id of the csv file';
var csv = DriveApp.getFileById(id).getBlob().getDataAsString();
var csvData = Utilities.parseCsv(csv);
csvData.forEach(function(row){
date = row[0]
row[0] = date.substring(6,10)+'-'+date.substring(3,5)+'-'+date.substring(0,2)
})
var f = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
f.getRange(1, 1, csvData.length, csvData[0].length).setValues(csvData);
}
First thanks to those that suggested a fix. I am not really a programmer and get cold sweats when I see suggesting of running scripts to solve simple problems. Sorry guys.
So the (non programmer) solution with the dates was to do a find/replace (CTRL + H) and replace all the (.)dots with (/)slashes, then to make sure the column is formatted as a date, then Google finally understands it as a date.
With the accounting values as well, I had to do the same find/replace to remove all the ' between thousands, then google woke up and understood them as numbers.
I am significantly underwhelmed by this from Google. They are getting too fat and lazy. They need some competition.

How can I compare and check date of program and the system date in MVS 2012 Coded UI test?

I am trying to compare and check the date if it is today's date or not in a spesific program. I tried to use assertion method but when I use it the time will remain same if you try it next day. The main problem that I need to know when open a page from program It should be today's date and should be passed. if you know already anything about it please let me know also :)
Thanks yo!
Use System.DateTime.Now.ToString("yyyy-MM-dd") as one argument of the assertion. You may need to use a different format rather in the ...ToString() method. The exact format depends on how the date is shown on the screen.
This could be done using "StringAssert" to verify that your programs date string contains today's date string, while ignoring the time:
var programDateString = "7/25/2016 12:00:00"; //this is an example of your date retrieved from the application with time included
var todaysDate = System.DateTime.Today.ToShortDateString(); //short date string
StringAssert.Contains(programDateString, todaysDate);

Find smallest difference between dates SAS

I have this HW question that is asking me:
Write a SAS Program to creates a data set that contains test date closest to
delivery date. Your program must work for any test date and delivery date.
Here is what I have done so far. The data sources are in seprate sheets in excel which I p pulled in and merged and there is only 1 deliver date and 21 test dates. I figure the best way to find the closest day was the absolute value of the smallest difference, then use proc sort because that is the only proc command we are allowed to use other than proc import and export. Any ideas/help/whatever would be appreciated thanks.
proc import datafile = "C:\Users\file1.xls"
dbms=xls replace out=labs; sheet = "labs";;
run;
proc import datafile = "C:\Users\file1.xls"
dbms=xls replace out=delivery; sheet = "delivery";
run;
data dl;
merge delivery labs;
dd = delivery_date;
diff = dd - Test_date;
run;
Here is the data they are both in 1 column didn't know how to format that here.
Sheet 1:
delivery_date
11/16/2011
Sheet 2:
Test_date
13-Mar-11
10-Apr-11
20-May-11
9-Jun-11
31-Jul-11
17-Aug-11
12-Sep-11
10-Nov-11
11-Oct-11
12-Dec-11
29-Feb-12
13-Mar-13
10-Apr-10
20-May-10
9-Jun-10
21-Jul-11
15-Aug-11
15-Sep-11
19-Oct-11
21-Nov-11
22-Dec-11
It sounds like you are on the right track. Given that this is homework, I'm not going to give you a complete solution, but here are some components you may find helpful:
First, you should look at the SAS website for more information about the absolute function (since that is the route you want to take):
SAS/IML(R) 9.3 User's Guide: ABS Function
Next, you may want to review the documentation for PROC SORT. It will be useful for finding the smallest difference.
For getting only one record, you may find the OBS Data Set Option helpful.
(Hint: you may need to create a second dataset.)

Set date in single line edit on opening

I'm using PowerBuilder 10.5 and I have two single line edit (SLE) fields - sle_date1 and sle_date2 on my window.
What I need is for those two fields to be filled once I open my program. sle_date2 has to have the value of today (for example - 09.07.13), and sle_date1 has to have the value of (sle_date2-30 days) (example 09.06.13).
So, as I said, once I open my programs both fields would be filled immediately with values of today's date and the date of a month before.
How could I do that? Any advice just to get me going?
You can add some code to populate the edits in the open() event of your window
with a given date that can be today(), you can compute a new date plus / minus a number of days with RelativeDate()
The following code just answers your question (though it could be better to use some editmask controls instead of singlelineedit as it would ease the handle of user's input):
date ld_now, ld_previousmonth
string ls_datefmt
ls_datefmt = "dd.mm.yy"
ld_now = today()
sle_1.text = string(ld_now, ls_datefmt)
ld_previousmonth= RelativeDate(ld_now, -30)
sle_2.text = string(ld_previousmonth, ls_datefmt)
It shows 09.07.13 and 09.06.13 at this time.
first of all you need to open your window. You can to this with put this code in your application open event (let suppose that your window is w_main):
open(w_main)
After that in put this code in your window's open event:
sle_date1.text = string(today())
sle_date2.text = string(RelativeDate(Today(), -30))
I think this solves your problem. Here is a little help for RelativeDate:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.pocketbuilder_2.0.pkpsref/html/pkpsref/pkpsref662.htm
Best Regards
Gábor