<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Why not store unix time stamp instead?<br><br><div><br></div></div><div><br>On Apr 26, 2013, at 12:58, Maruthavanan Subbarayan <<a href="mailto:maruthavanan_s@hotmail.com">maruthavanan_s@hotmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi,<div><br></div><div>i have mnesia table which stores date in tuple format {Y,M,D}, </div><div><br></div><div>To fetch data that falls on given date frames I tried to use this record</div><div><br></div><div>MatchSpec = [{#appointment{id='$1', starttime = '$2', endtime = '$3', _='_'},</div><div> [{'orelse',{'>=','$2',StartTime},{'orelse',{'=<','$3',EndTime}}}],</div><div><span style="font-size: 12pt;"> ['*']}]</span> </div><div><br></div><div>where Startime and Endtime are records. This throws and bad arg during transaction.</div><div><br></div><div>But when I change the Startime and End time as integer or list it executes without any problem.</div><div><br></div><div>Is this the normal behaviour, or am I missing out anything, Any work around to achieve this?</div><div><br></div><div>Thanks,</div><div>Marutha</div> </div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></span><br><span><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></div></blockquote></body></html>