Sponsored Content
Full Discussion: Dates in C
Top Forums Programming Dates in C Post 302418397 by Ister on Tuesday 4th of May 2010 07:34:42 AM
Old 05-04-2010
Dates in C

Hello,

I am working on a program in C and need to read, write and manage Dates (YYY-MM-DD HH:MM). I have made my own version of a structure to store the date data and something else. Do you recommend me to use the time.h library? In such case, is it worthwhile to have an structure containing another tm strcture and 2 float fields?

Thanks in advance for your help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need script to generate all the dates in DDMMYY format between 2 dates

Hello friends, I am looking for a script or method that can display all the dates between any 2 given dates. Input: Date 1 290109 Date 2 010209 Output: 300109 310109 Please help me. Thanks. :):confused: (2 Replies)
Discussion started by: frozensmilz
2 Replies

2. Shell Programming and Scripting

Difference between two dates

Hi! I have two parameters like this: YYYY-MM-DD YYYY-MM-DD My question is, there is a direct command for get the elapsed time between the 2 dates, or I have to find another way? Thx! (1 Reply)
Discussion started by: MalaTomi
1 Replies

3. UNIX for Dummies Questions & Answers

Generate dates

let says, today is my payroll day (7/26), my next payroll day will be 8/9. i want to generate a shell script to extract 8/9, 8/23, 9/6, and so on for 2010. (2 Replies)
Discussion started by: tjmannonline
2 Replies

4. Programming

SQL: find if a set od dates falls in another set of dates

Don't know if it is important: Debian Linux / MySQL 5.1 I have a table: media_id int(8) group_id int(8) type_id int(8) expiration date start date cust_id int(8) num_runs int(8) preferred_time int(8) edit_date timestamp ON UPDATE CURRENT_TIMESTAMP id... (0 Replies)
Discussion started by: vertical98
0 Replies

5. Emergency UNIX and Linux Support

Replacing dates]] with (dates)]]

Hi guys, For my wiki site I need to fix 1400 pages that use the wrong date format, most pages (not all) use eg. 1988]] I need to change that to (1988)]] The date range goes back to 1400 so I guess I need to do the following ssh into my server, dump mysql database vi .sql dump search... (20 Replies)
Discussion started by: lawstudent
20 Replies

6. UNIX for Dummies Questions & Answers

How to write the dates between 2 dates into a file

Hi All, I am trying to print the dates that falls between 2 date variables into a file. Here is the example. $BUS_DATE =20120616 $SUB_DATE=20120613 Output to file abc.txt should be : 20120613,20120614,120120615,20120616 Can you pls help me accomplish this in LINUX. Thanks... (5 Replies)
Discussion started by: dsfreddie
5 Replies

7. Shell Programming and Scripting

Generating dates between two dates

HI, i have row like this HHH100037440313438961000201001012012073110220002 N in this i have 2 dates in pos 25-32 and 33-40 , so based upon the se two dates , i need to generated records between these two values so in the above record 20100101 and 20120731 need to genearte rows like this... (4 Replies)
Discussion started by: sathishsr
4 Replies

8. UNIX for Advanced & Expert Users

How to get the Missing dates between two dates in the table?

Hi Am Using Unix Ksh ... I have a Table called date select * from date ; Date 01/02/2013 06/02/2013 I need the output as Missing Date 01/02/2013 02/02/2013 03/02/2013 04/02/2013 05/02/2013 06/02/2013 (2 Replies)
Discussion started by: Venkatesh1
2 Replies

9. Shell Programming and Scripting

How to get dates between two dates?

HI, to my shell script i pass two parameters date1 and date2 is there any way to get all dates betwen these two dates? if i pass 20130714 and 20130717 i need to get below dates 20130715 20130716 is it possible. thanks (3 Replies)
Discussion started by: ulab
3 Replies

10. Shell Programming and Scripting

Display dates between two dates

Hi All, I have 2 dates in mm/dd format. sdate=10/01 (October 01) edate=10/10 (October 10) I need the dates in between these 2 dates like below. 10/01 10/02 10/03 10/04 10/05 10/06 10/07 10/08 (1 Reply)
Discussion started by: jayadanabalan
1 Replies
rb(3erl)						     Erlang Module Definition							  rb(3erl)

NAME
rb - The Report Browser Tool DESCRIPTION
The Report Browser (RB) tool makes it possible to browse and format error reports written by the error logger handler log_mf_h . EXPORTS
filter(Filters) filter(Filters, Dates) Types Filters = [filter()] filter() = {Key, Value} | {Key, Value, no} | {Key, RegExp, re} | {Key, RegExp, re, no} Key = term() Value = term() RegExp = string() | {string, Options} | mp(), {mp(), Options} Dates = {DateFrom, DateTo} | {DateFrom, from} | {DateTo, to} DateFrom = DateTo = {date(), time()} date() and time() are the same type as in the This function displays the reports that match the provided filters. When a filter includes the no atom it will exclude the reports that match that filter. The reports are matched using the proplists module. The report must be a proplist to be matched against any of the filters() . If the filter is of the form {Key, RegExp, re} the report must contain an element with key = Key and Value must match the RegExp regular expression. If the Dates parameter is provided, then the reports are filtered according to the date when they occurred. If Dates is of the form {DateFrom, from} then reports that occurred after DateFrom are displayed. If Dates is of the form {DateTo, to} then reports that occurred before DateTo are displayed. If two Dates are provided, then reports that occurred between those dates are returned. If you only want to filter only by dates, then you can provide the empty list as the Filters parameter. See rb:grep/1 for more information on the RegExp parameter. grep(RegExp) Types RegExp = string() | {string, Options} | mp(), {mp(), Options} All reports containing the regular expression RegExp are printed. RegExp can be a string containing the regular expression; a tuple with the string and the options for compilation; a compiled regu- lar expression; a compiled regular expression and the options for running it. Refer to the module re and specially the function re:run/3 for a definition of valid regular expressions and options. h() help() Prints the on-line help information. list() list(Type) Types Type = type() type() = crash_report | supervisor_report | error | progress This function lists all reports loaded in the rb_server . Each report is given a unique number that can be used as a reference to the report in the show/1 function. If no Type is given, all reports are listed. rescan() rescan(Options) Types Options = [opt()] Rescans the report directory. Options is the same as for start() . show() show(Report) Types Report = int() | type() If a type argument is given, all loaded reports of this type are printed. If an integer argument is given, the report with this ref- erence number is printed. If no argument is given, all reports are shown. start() start(Options) Types Options = [opt()] opt() = {start_log, FileName} | {max, MaxNoOfReports} | {report_dir, DirString} | {type, ReportType} | {abort_on_error, Bool} FileName = string() | standard_io MaxNoOfReports = int() | all DirString = string() ReportType = type() | [type()] | all Bool = true | false The function start/1 starts the rb_server with the specified options, while start/0 starts with default options. The rb_server must be started before reports can be browsed. When the rb_server is started, the files in the specified directory are scanned. The other functions assume that the server has started. {start_log, FileName} starts logging to file. All reports will be printed to the named file. The default is standard_io . {max, MaxNoOfReports} . Controls how many reports the rb_server should read on start-up. This option is useful as the directory may contain 20.000 reports. If this option is given, the MaxNoOfReports latest reports will be read. The default is 'all'. {report_dir, DirString} . Defines the directory where the error log files are located. The default is {sasl, error_logger_mf_dir} . {type, ReportType} . Controls what kind of reports the rb_server should read on start-up. ReportType is a supported type, 'all', or a list of supported types. The default is 'all'. {abort_on_error, Bool} . This option specifies whether or not logging should be aborted if rb encounters an unprintable report. (You may get a report on incorrect form if the error_logger function error_msg or info_msg has been called with an invalid format string). If Bool is true , rb will stop logging (and print an error message to stdout) if it encounters a badly formatted report. If logging to file is enabled, an error message will be appended to the log file as well. If Bool is false (which is the default value), rb will print an error message to stdout for every bad report it encounters, but the logging process is never aborted. All printable reports will be written. If logging to file is enabled, rb prints * UNPRINTABLE REPORT * in the log file at the location of an unprintable report. start_log(FileName) Types FileName = string() Redirects all report output from the RB tool to the specified file. stop() Stops the rb_server . stop_log() Closes the log file. The output from the RB tool will be directed to standard_io . Ericsson AB sasl 2.1.9.3 rb(3erl)
All times are GMT -4. The time now is 03:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy