Recent

Author Topic: TDateEdit  (Read 3039 times)

rigel

  • New Member
  • *
  • Posts: 29
TDateEdit
« on: August 20, 2012, 11:42:58 pm »
How can I use TDateEdit to store date to 3 integer variables for Day, Month and Year. Is there a function like decodedata(deDate, Day, Month, Year)?

Zoran

  • Hero Member
  • *****
  • Posts: 1949
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: TDateEdit
« Reply #1 on: August 21, 2012, 12:15:11 am »
How can I use TDateEdit to store date to 3 integer variables for Day, Month and Year. Is there a function like decodedata(deDate, Day, Month, Year)?

Yes, there is -- http://www.freepascal.org/docs-html/rtl/sysutils/decodedate.html
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: TDateEdit
« Reply #2 on: August 21, 2012, 08:43:12 am »
To add to Zoran's response, there are lots of datetime utils in unit dateutils.
eg.  YearOf,MonthOf,millisecondsbetween etc...
If you open the fpcsrc\rtl\objpas\dateutils.inc you'll see a nice list.

rigel

  • New Member
  • *
  • Posts: 29
Re: TDateEdit
« Reply #3 on: August 21, 2012, 01:25:03 pm »
Thank you both!

 

TinyPortal © 2005-2018