15,894,343 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by samtoad (Top 9 by date)
samtoad
29-Apr-24 18:27pm
View
Rick York,
I did this, and it worked. W/o the "const int" statement, it abended.
void CopyDateStr( char * buffer, const char * datetext ) {
const int MaxDateLength = 11;
strncpy(dateout, datein, MaxDateLength);
dateout[MaxDateLength] = '\0';
return(1);
}
Thanks
The 'strncat' reminds me of the strncpy statement.
thx
samtoad
12-Mar-24 12:51pm
View
To all,
I finally figured the problem out, after experiences many trial_and_errors on one line at a time.
So stop scratching your head a little too hard. This is the solution...
The problem lies at line # "**".
printf(" We are in Std Time: %ws \n", dtzi.StandardName); /// The same approach with daylightdate.
** SEdaylightdate = dtzi.StandardDate; //// it worked.
///// I had to get the dtzi.StandardDate systemtime form into an external, but still in the
///// program, systemtime datatype. And the rest is history.
///// This piece of code is straight forward and very simple in approach.
SEdaylightdate.wYear = intccyrval; /// Only put in default CCYY value. I did this.
printf("Standard Time starts: ");
PrintSystemTime(&SEdaylightdate);
///// Here is the output. I put in the 2024 year value before printing.
///// Standard Time starts: 11-01-2024 ----- 02:00:00
///// this "date" data that MS provides is very cryptic. But the date is somewhat
///// there from what trial_ad _errors that I've found with and played with.
And again, many Thanks.
samtoad
11-Mar-24 21:11pm
View
In attempting to implement all these solutions, there have been no success'. All I'm trying to do is to convert these two dates, the standard and daylightsavings dates, into a systemtime/TM readable form and then onto human readable forms.
In reviewing these dates, both are of systemtime datatypes. It seems like everything is of "systemtime" datatypes and would seem easy, but not. Are there any working "C" examples showing these smooth conversions, so to avoid any confusion. I'll keep working on my side. Thanks for the continued help. Samtoad.
samtoad
11-Mar-24 13:14pm
View
Hey Pete...,
In attempting to impliment your solution, the MSVC2019 compiler kicked out the function(SystemTimeToLocalFileTime) as
undefined... I didn't find any material on the subject(function); thinking that I was missing a certain ".h" include file,
but nope. Were you thinking of using another function? When I did the search on 'SystemTimeToLocalFileTime', it responded
back with a question saying is what you mean: System Time To Local File Time... I said yes, ...
It further goes into the topic of "FileToLocalFileTime". All I wanted to do is to convert two dates, within the timeZoneInfo area,
into a readable Date/Time forms and not get into any timezone stuff. Thanks though, Samtoad.
samtoad
2-Jun-23 11:03am
View
You know,... with a little kindness, courtesy, and consideration are attributes; when working with people, can go a long way if used correctly. I have the answer(s) that I was looking for, and with a little bit of rewriting; it works! The answer(s) turned about to be very simple and could have even
amazed you. Thanks.
samtoad
27-May-23 23:07pm
View
Thanks OriginalGriff and Richard MacCutchan. But in the mean time, what about providing some solid/working examples as requested, showing me what I have done wrong with some explanation, and then show me your working examples of how you fixed the problems. Like the following statement: "I have created a test version of your problem and it works fine. The dll can read the data from the StringBuilder object. Also, the returned time value is correctly stored as a long integer."
As for this statement, ""Also, I do not think you can use a StringBuilder reference in C# to corresponde to a char* in C;"", I have been using StringBuilder reference in C# to corresponde to a char * charvariable for a long time and they have worked quite well, and I have had no problems with them -- as you mentioned to the contrary.
I have worked on this project for a long time, and have worked out a lot of problems on my own. But now, I'm only looking for some help. Not a confrontation. Please, can you help.
samtoad
6-Dec-20 17:43pm
View
Accepted, thanks, it works.
samtoad
5-Aug-19 23:11pm
View
Ok richard, smart-alic! I graduated in 1984, from Utah State University, Logan, Utah.. NOT IN 1940. Each one of us has each his style.
samtoad
4-Aug-19 18:27pm
View
Ok Richard M., 'OriginalGriff': Ok, a little clarification; This is not homework
and nor am I in any university programming class. I graduated from a State
university in the USA a long time ago; probably a long before you were even born.
Shortly after, I learned "C" out in
industry and have stayed with it. Through out my education and industry
experience, I've just picked up a style that I've stayed with and have never
been critized for, since I was doing the programming and it has done me well.
Just a thought: find out all the facts first before you jump down their
throats and start critizing their work. Hum...
Show More