Forum Index

No notifications
Notifications

Favorites

No favorites found
General Training Discussion General chat and comment on KnowledgeKube training
Subscribe to post
User avatar
andrew.matthews - (11/07/2016 10:09:16)
RE:Insert datetime into MSSQL
Hi Arun, When writing dates to a datasource using WriteData you need to include the date format in the WriteData expression through an optional parameter DateFormat. These optional parameters can be found by using the Intellisense feature (CTRL + Space) and using the Up and Down arrows to cycle through optional parameters. You can tell if a function has optional parameters by looking for the X of X in the top left corner, like in the attached screenshot for WriteData.
WriteData(NewData, RowID, DataSource, GenerateIndex, DateFormat);
This are all the parameters for WriteData, DateFormat should match the format of the DateTime data being written away, with some extra characters added. Using the format you've included above you're write data should look like this.
WriteData(NewData, RowID, DataSource, "False", "{0:MM/dd/yyyy HH:mm}");
Note: As a value if being given to DateFormat, a value must also be given to GenerateIndex the default is "False". This should solve your issues with the time not being included, if you have any further problems with this just let me know. Kind Regards
RSS Feed