"> "> " />

"O'tgan hafta" Sana Jasper HAQIDAGI Shartli uslublari

O'tgan haftadan xurmoga qalin shakllanadigan uslubni yaratishga harakat qilaman. Men uni faqat quyidagi kabi aniq bir kunga qo'yib ishlashga muvaffaq bo'ldim. Hozirgi kunga asoslangan dinamik "o'tgan haftaga" ega bo'lishni xohlayman.



0

1 javoblar

  • You can try this expression to get 'last week' (today minus seven days)
    
    
    
    

    You can see also this link for better understanding this solution.

    • You can try to get date via SQL query and put the result value to the new Date field.
      It would be something like this for Oracle:
       SELECT account_date, sysdate-7 as last_week, ... FROM table ...
      

      It would be something like this for MS SQL:

      SELECT account_date, (GETDATE() - 1) as last_week , ... FROM table ...
      
    • Another way to pass date from code via parameter.
    • Or you can try to import Joda library for example. Here is the sample of scriplet using.
  • 0
    qo'shib qo'ydi
    SQL usulini ishlatish. Bu oson edi.
    qo'shib qo'ydi muallif FSUmatt, manba