Jul 31, 2015, 12:40 PM
Datefield selection into a string for use in a SQL procedure
Hi I am new to EXT.net and am trying to use the datefield.
I have it showing using this ->
I though using this would do it but it doesn't
Mark
I have it showing using this ->
<ext:Window ID="dateWindow"
runat="server"
Width="350"
Title="DateRange"
Icon="Date"
Closable="false"
BodyPadding="2"
Layout="Anchor"
DefaultAnchor="100%"
X="0"
Y="0" >
<Items>
<ext:DateField
ID="DateField1"
runat="server"
Vtype="daterange"
FieldLabel="From"
>
<CustomConfig>
<ext:ConfigItem Name="endDateField" Value="DateField2" Mode="Value" />
</CustomConfig>
</ext:DateField>
<ext:DateField
ID="DateField2"
runat="server"
Vtype="daterange"
FieldLabel="To" >
<CustomConfig>
<ext:ConfigItem Name="startDateField" Value="DateField1" Mode="Value" />
</CustomConfig>
</ext:DateField>
<ext:Button ID="getReportBtn" runat="server" OnClick="getReportBtn_Click" Text="GO"></ext:Button>
</Items>
</ext:Window>
Which works fine but I need to use the dates in a stored SQL procedure. So i need to convert the selection into a string.I though using this would do it but it doesn't
string paramEnd_Date = (string)DateField1.ToString("yyyy-MM-dd");
Any help would be appreciated.Mark