• Marco Heinrich
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

I create a datetime fields and I want to write it the date of CreatedDate with custom hours and minutes. If it will exist a function datetime like date(year,month,day) I solve my problem!!

 

The problem is that I want to send an email to lead at X hours Y minutes with workflow.

If the lead was created in the night, I don't want send email to lead immediately and so I will send the email in the office time (9am to 8 pm) and not in the night

Maybe I have to do a case condition, because if the lead is created at 9 pm, the datetime field will have the next day at 9 am

 

I think to write some code like this

 

 

date( year(datevalue(createddate)), month(datevalue(createddate)),day(datevalue(createddate)) ) & 09:00:00.000Z

 

 

 

Anyone can help me?