Hi @kauan pedroso, was Luis Gustavo Freitas's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.
If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.
Hello Kauan,
I would need to see your model to know what can be done. For now, I recommend you to use the DateTime functions the way you're using to create columns that will be used to filter, something like SET a Month Column and filter it normally.
Hello @Luis Gustavo Freitas
I can't share my file, but I can show the script that pulls the data. I would like to filter the date InputTimestamp.
Hello Kauan, I've been working in a solution that might be close to what you need.
Here i'm using a query to import the dbConnector by Custom Code. This code compare the date column of the database "Arrivals" (that is in Excel format in this case) whitin the current Model Time and pulls just 1 week of data to GlobalTable1.
Database.Connection dbConn = Database.Connection("db_Historic"); //Query pulls and order the Arrivals in interval of 7 days based on Model DateTime dbConn.query("SELECT * FROM input_2022 WHERE Arrivals BETWEEN " + string.fromNum(Model.dateTime.excelTime) + " AND " + string.fromNum(Model.dateTime.excelTime + 7) + " ORDER BY Arrivals ASC").cloneTo("GlobalTable1");
By that you can execute this code as many times you need and decrease your model's weight. Depending on your database time format you might need to use other functions of Model.dateTime to adapt the query.
Hello Luis, I tried to adapt your code to mine and ended up giving error.
15 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved