openmolecules.org

 
Home » DataWarrior » Functionality » Macro questions: preserving columnProperty and setting date filter
Re: Macro questions: preserving columnProperty and setting date filter [message #1227 is a reply to message #1225] Fri, 12 February 2021 12:33 Go to previous messageGo to previous message
thomas is currently offline  thomas
Messages: 663
Registered: June 2014
Senior Member
Hi Andrew,

first I must correct myself. The stored and used date value is not the milliseconds value itself. It is the milliseconds since Jan 1st, 1970 devided by 86400000, which makes the float the number of days since Jan 1st, 1970.

You cannot use a macro or filter to directly filter dates in relation to the current date, but you can calculate a new column (e.g. in a macro) using an expression like 'today()-myDateColumn' and then use a filter on that column.

Your other question related to the column properties macro: This will work if you replace the TABs by equal signs ("\t" by "="). TABs are used as separators in the column properties section of the file. The column properties dialog uses equal signs, because they are more user friendly. And they are also used within the macro file format. TABs as separators in the file have been a strange decision, but now they are there to live with them.

Thomas
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 2D coordinates in the template
Next Topic: Confidentiality of compound structures
Goto Forum:
  


Current Time: Sat May 18 20:59:36 CEST 2024

Total time taken to generate the page: 0.00714 seconds