# How to show only records from Dataset where \[date field\] = today's date

**URL:** <https://forum.wixstudio.com/t/how-to-show-only-records-from-dataset-where-date-field-todays-date/8935>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [December 7, 2022, 1:25pm UTC](https://forum.wixstudio.com/t/how-to-show-only-records-from-dataset-where-date-field-todays-date/8935 "2022-12-07T13:25:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![studio39598](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/studio39598/32/10321_2.png) [@studio39598](https://forum.wixstudio.com/u/studio39598)\
**Post date:** [December 7, 2022, 1:25pm UTC](https://forum.wixstudio.com/t/how-to-show-only-records-from-dataset-where-date-field-todays-date/8935/1 "2022-12-07T13:25:25Z")

</div>

Hi there, i need help with filtering data from a collection/dataset such that it displays only items with Today’s date. I have tried the code below but the table on the site is coming up blank.

import wixData **from** “wix-data” ;

**var** d = **new** Date ();  
d . setHours ( 0 , 0 , 0 , 0 );

**var** todayStr = ( d . getMonth ()+ 1 ) + “/” + d . getDate () + “/” + d . getFullYear ();

console . log ( todayStr );

$w . onReady ( **function** () {

$w ( “#dataset1” ). setFilter ( wixData . filter (). eq ( “sort” , 2 ));

console . log ( $w ( “#dataset1” ));

});
