Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Replace Null Dates with Today's Date

Hello, I have a dataset which includes a date column where there are nulls. I'd like to replace these nulls with today's date. So the example above should look something like this at the end: ...
  • Ritaf1983's avatar
    3 years ago

    Hi Anonymous 
    You can achieve it with 3 simple  steps:
    1. Add customed column :
    DateTime.Date( DateTime.LocalNow() )

    2. Use it in condition and add Fixed column :
    if [Date]=null then DateTime.Date( DateTime.LocalNow() )
    else [Date]

    3. remove the original date column and change data type of added to date

     

    Link to a sample file 

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly