[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

_ Formatting GMT time

Posted on 1998-11-07
4
Medium Priority
?
229 Views
Last Modified: 2010-04-04
Hi, in C Builder, there's a command like FormatGMT

Does Delphi have something like that?

If not, is there anyone who can tell me how to format date for GMT.

Wein
0
Comment
Question by:Wein
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 160 total points
ID: 1346039
Find out your local time offset (ie: in NewZealand our normal time off set is 12 hours ahead of GMT) and apply this offset to the time given to you by Time (or just use GetSystemTime which returns UTC time which is equivalent to GMT). Then just format this as a normal date.

Cheers,

Raymond.
0
 

Author Comment

by:Wein
ID: 1346040
Can you write down the source?

Because i can't get the Api Call structure properly.

And i've tried to use GetTimeZoneInformation.

Write the complete source for all this.
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1346041
Function GetFormatGMTTime : String;

var
  SystemTime : TSystemTime;
  GMTTime : TDateTime;

begin
  GetSystemTime(SystemTime);
  GMTTime := SystemTimeToDateTime(SystemTime);

// Format GMTTime any way you want... eg:
  Result := FormatDateTime('hh:mm:ss', GMTTime);
end;

0
 

Author Comment

by:Wein
ID: 1346042
Thank you.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question