Context : We have mapped the HCN ( 1–0 ) emission from two spiral galaxies , NGC 2903 and NGC 3504 to study the gas properties in the bars . The HCN ( 1–0 ) emission is detected in the center and along the bar of NGC 2903 . The line ratio HCN ( 1–0 ) / ^ { 12 } CO ( 1–0 ) ranges from 0.07 to 0.12 with the lowest value in the center . The enhancement of HCN ( 1–0 ) emission along the bar indicates a higher fraction of dense molecular gas in the bar than at the center . The mass of dense molecular gas in the center ( 2.2 \times 10 ^ { 7 } \mathcal { M } _ { \odot } ) is about 6 times lower than that in the bar ( 1.2 \times 10 ^ { 8 } \mathcal { M } _ { \odot } ) . The total star formation rate ( SFR ) is estimated to be 1.4 \mathcal { M } _ { \odot } \mbox { yr } ^ { -1 } , where the SFR at the center is 1.9 times higher than that in the bar . The time scale of consumption of the dense molecular gas in the center is about \sim 3 \times 10 ^ { 7 } yr which is much shorter than that in the bar of about 2 to 10 \times 10 ^ { 8 } yr . The dynamical time scale of inflow of the gas from the bar to the center is shorter than the consumption time scale in the bar , which suggests that the star formation ( SF ) activity at the center is not deprived of fuel . In the bar , the fraction of dense molecular gas mass relative to the total molecular gas mass is twice as high along the leading edge than along the central axis of the bar . The HCN ( 1–0 ) emission has a large velocity dispersion in the bar , which can be attributed partially to the streaming motions indicative of shocks along the bar . In NGC 3504 , the HCN ( 1–0 ) emission is detected only at the center . The fraction of dense molecular gas mass in the center is about 15 % . Comparison of the SFR with the predictions from numerical simulations suggest that NGC 2903 harbors a young type B bar with a strong inflow of gas toward the center whereas NGC 3504 has an older bar and has already passed the phase of inflow of gas toward the center . Aims : Methods : Results : Conclusions :