hey guys
I need some help, I have a table that the data comes from a SQL SERVE database but in the date columns the values are coming in seconds. How can I do to change this?
as is in FlexSim
as is in SQL SERVE
hey guys
I need some help, I have a table that the data comes from a SQL SERVE database but in the date columns the values are coming in seconds. How can I do to change this?
as is in FlexSim
as is in SQL SERVE
It is possible to customize the table view to show the numeric value as a date time string - but you should ask the developers to add that as a standard formatting option for a table in the Ideas section.
In your select statement you can use for each field respectively the DateTime constructor to get the string value:
DateTime(InputTimestamp).toString() AS InputTimestamp
You can change how the string is formatted using a format string.
Note that once it's a string in FlexSIm and manipulates are harder so it's easier to work with the numeric value. For this reason I'd import the numeric value AND a formatted string into two columns for now:
SELECT InputTimestamp, DateTime(InputTimestamp).toString() AS InputDatetimeStr FROM....
So @Jason Lightfoot did what you had written but i ended up getting this error.
Yes you have to use a function within FlexSim - so just import an empty string for InputDatetimeStr from SQLserver, and then run an update script (Table query with UPDATE sql) to set the empty string to the converted datetime using the InputDatetime field.
I'm trying to use the same function I use in sql serve, but I'm not able to add the column.
You can just use:
SELECT InputTimestamp, '' AS InputTimestampStr FROM .......
when bringing in the data from SQL Server.
Hello @Jason Lightfoot , I managed to create the empty columns as you said, if you can help me how I create the code to run an update script to define an empty string for the converted datetime using the inputDatetime field, thank you.
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