0

I'm seeing a lot of tutorials and examples on taking date input from the user, but I want Alexa to check the date on its own and if the date matches a certain day, she will have a different set of responses to give the user.

I'm trying to do this in C#, but all of the tutorials I'm finding aren't exactly up to date and I've encountered issues due to that.

Amazon has a section on adding onto built in slots and even gets close to what I was hoping to achieve but they never do it. I have the utterances and all put together, but trying to figure out if I need to figure out node.js to say if it's a certain date that it will say something specific without the user giving up the date.

Thanks for any pointers.

TomG103
  • 311
  • 2
  • 26
  • you don't need to take any custom slot as you need to check today's date , that logic can be written in C#. Create a simple skill without custom slots and in your invocation method write something like this ( code is jscript ) you can find similar code in c# on net – Amod Gokhale Nov 23 '17 at 04:45
  • // Create date from input value var inputDate = new Date("11/21/2011"); // Get today's date var todaysDate = new Date(); // call setHours to take the time out of the comparison if(inputDate.setHours(0,0,0,0) == todaysDate.setHours(0,0,0,0)) { // Date equals today's date } – Amod Gokhale Nov 23 '17 at 04:45
  • I actually got the code to work, but I'm trying to figure out how a AWS Lambda gets tied in with my Alexa skill. I've added the ARM info, but not sure how my code calls the skill or vice versa. – TomG103 Nov 24 '17 at 18:01

0 Answers0