I have a a hidden field with a field query to calculate mmddyyhhmm (time and date). I test the query and I see good results.
I have a token set on the hidden filed called [DATETIME]. I have this token set on my custom email template
I have a field name called DateTime and it is mapped in the table - it is nvar set to 10.
I complete the form and submit.
When I go to the table I see the column for DateTime but it is empty.
When I get the email the [DATETIME] is blank
Why is the query not getting into the field/token?
Here is the query I used to calculate (I got it from this forum :):
<!--[if gte mso 9]>
Normal
0
false
false
false
MicrosoftInternetExplorer4
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
<!--[if gte mso 10]>
select CASE len(datepart(mm,GetDATE())) when 1 then
'0'+convert(varchar,datepart(mm,GetDATE())) else
convert(varchar,datepart(mm,GetDATE())) end+
CASE len(datepart(dd,GetDATE())) when 1 then
'0'+convert(varchar,datepart(dd,GetDATE())) else convert(varchar,datepart(dd,GetDATE()))
end+
substring(convert(varchar,datepart(yy,GetDATE())),3,2)+
CASE len(datepart(hour,GetDATE())) when 1 then
'0'+convert(varchar,datepart(hour,GetDATE())) else
convert(varchar,datepart(hour,GetDATE())) end+
CASE len(datepart(minute,GetDATE())) when 1 then
'0'+convert(varchar,datepart(minute,GetDATE())) else
convert(varchar,datepart(minute,GetDATE())) end as TrackNumber