190
Views
2
Comments
'DateTime' data type required instead of "Date Time'.
Question

Hi there,


I came accross a funny, I am building a test for a piece of code where I want to iterate over a week's dates and see the outcome.  I created a structure with a single value field of type Date Time.

I want to append the dates to a list of the structure that I just created by adding days to the initial date and then adding the counter(Integer) to it so that I can choose as many days as I want.

This is what I get:

Am I missing something?

2024-12-17 14-32-59
Matthias Preuter
 
MVP

Dates in your code is a List of the type DateTime-structure; you are trying to add a 'Date Time' value to a list of DateTime. 

Simply change the Dates local variable to type List of Basic Types Date TIme and remove the structure DateTime.


2016-04-21 20-09-55
J.
 
MVP

Yes and no,

It's because of the structure.

You can either fix it by changing the "Dates" to a list of "Date Times"

Or you need use a local var of that specific struct.


Normally it would provide you a mapping, but that only works if you are using records/structs to map.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.