- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 08:20 AM
Hello, i have an inbound email action to create a new records from emails.
The email body_test contains string date, presented in such way, for example - Thursday, July 14, 2016 11:00:43 PM
I'm extracting that date, and i need it to be inserted in the DATE/Time field [u_date] (so for example - 2016-07-14 23:00:43)
Do you have suggestion on how to do that?
Any input will be welcomed, because i'm lost with that
Thank you!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 08:52 AM
Oh wow, that is a lot of coding. If I am not wrong, this can be achieved in 4 lines
var sec=Date.parse("Thursday, July 14, 2016 11:00:43 PM");
var gdt = new GlideDateTime();
gdt.setNumericValue(sec);
gdt.getDisplayValue(); //this will give you the date in your format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 11:50 AM
Tried with both but with getValue() - also not the same
example email it isThursday, July 14, 2016 11:00:43 PM)
the resulting DATE/TIME record is - 2016-07-15 06:00:43
Chuck, when i tried your solution, can you please tell me what is wrong with variable assignment
- var str = 'July 14, 2016 11:00:43 PM'; //works
- \\ in my case i put
- var testDate = email.body_text.substring(email.body_text.indexOf('follows:')+8, email.body_text.indexOf(' PM')+3).trim();
- var str = testDate; // result - the field in the table is empty.
- \\or
var testDate = email.body_text.substring(email.body_text.indexOf('follows:')+8, email.body_text.indexOf(' PM')+3).trim();
var str = str + testDate;// result - the field in the table is empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2020 11:39 AM
Hello Chuck,
We have slimier requirement like,
I need to sent an email body like ..
Date : 22/01/2020
Time : 12:02:31
when I am sending like this - i need to merge date and time both need to set it in one custom table column like date and time .
how to merge in inbound action both of email body , please help me with same .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2020 02:30 PM
Are you talking about processing the inbound mail or outbound? your other message made it sound like inbound. Just wanted to be sure.
See my response to process inbound email on your other message here:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 11:46 AM
Which time zone are you in?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 11:53 AM
CET GMT+1