Results 1 to 3 of 3

Thread: Create and convert a datatime to string

  1. #1

    Create and convert a datatime to string

    Hello you all,

    Can you please tell me how to create the present datatime and convert it to a string.
    In Delphi7 it was something like........:
    Datum := DateTime(Now);
    Date := DateTimeToStr(Datum);

    BUT this is not working in Delphi8, because I don`t want to use VCL utils.

  2. #2
    5th member of nldelphi
    Join Date
    Mar 2001
    Location
    Alkmaar
    Posts
    2,127
    Siep even tussendoor...
    Je posts mogen gewoon in het Nederlands hoor, vandaar ook de NLDelphi.

    richard
    RLD

  3. #3
    SillyMember
    Join Date
    May 2003
    Location
    Gent
    Posts
    7,725
    Code:
    var
      Vandaag, Nu: DateTime;
    begin
      Vandaag := DateTime.Today;
      Nu := DateTime.Now;
      MessageBox.Show(Vandaag.ToString('dddd dd MMMM yyyy') + #13 +
                      Vandaag.ToString + #13 +
                      Nu.ToString);
    All methodologies are based on fear. -- Kent Beck.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •