how to make a day from date in LibreOffice? - date

I want to convert date into a Day
I am using LibreOffice
I used some of its syntax weekday and text but it returns nothing
WEEKDAY("30-04-2019"; 1) is there any way to do that?
in google sheet i used =TEXT(C7758,"dddd") but it didn't work
how can I do that?
thanks in advance

Try the combination of functions WEEKDAY and DATE:
=WEEKDAY(DATE(2019;4;30))
The specific example will return 3 which is Tuesday (see all days and other options at https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_WEEKDAY_function)
Hope that helps.

Related

Erlang - invalid/wrong date

How can I validate a date in Erlang?
What happens is that, for example, the date 2018-02-31 is a "valid date" in the sense that I can work with it. When I insert this date on a table (field date) it converts itself to 2018-03-03 (2018-02-28 + 3 days).
What I want is a way to let me know that the original date of my example (2018-02-31) is indeed an invalid date.
Thank you.
Try to use calendar module
calendar:valid_date(Date) -> boolean().
calendar:valid_date(Year, Month, Date) -> boolean().
You will receive true or false
The detailed information and correct input format is here Erlang Calendar Module
I found out that this works just fine for me:
calendar:valid_date()
Thank you.

Formatting a date retrieved from Wikidata

So let's say I have an Infobox template in Wikipedia that retrieves a company foundation date from Wikidata. It contains the following code:
|label7 = Year founded
|text7 = {{wikidata|p571|{{{founded|}}}}}
My problem is that what's retrieved is formatted as 31 January 2010 and it looks weird next to "Year founded' since it is not a year but the whole date. Of course I could rename the label from "Year founded" to "Date founded" and voila, problem solved, right? But I do want to just get the year from Wikidata, not the whole date.
What would be the code for this? I imagine something like {{wikidata|p571[year]|{{{founded|}}}}} or {{wikidata|p571[0]|{{{founded|}}}}} or {{wikidata|p571[YYYY]|{{{founded|}}}}}.
Thanks in advance!
This doesn't sound like a programming question, but it looks like you can request a specific date format as the third parameter to wikidata
https://en.wikipedia.org/wiki/Module:Wikidata#Testing_getValue.2C_getRawValue_and_getDateValue
{{#invoke:Wikidata|getDateValue|P569|FETCH_WIKIDATA|y}}
I highly recomend you to filter the year from date using RegularExpression instead of trying to get only the year.

How to get the last day of the current month in DataStage?

I have explored all the functions avialable in the trasformer, but could not found the exact function to get the last day of current month by passing date in same default format i.e. yyyy-mm-dd.Please help me in this regard.
Field("31|28|31|30|31|30|31|31|30|31|30|31", "|", MonthFromDate(InLink.dateVar))
It is more precise to establish the first day of next month then use DateFromDaysSince function to establish the day before. I created an integer(6) stage variable which contained century and month+1 from source link e.g. 201410
DateFromDaysSince(-1, StringToDate(svIHBKPR, "%yyyy%mm") : "%yyyy-%mm-%dd")
There is a transformer function called DaysInMonth.
Example: DaysInMonth(“2017-01-23”)= 31

Getting individual values from GWT datebox?

I'm a newbie so please help me in this. I have a datebox with a default date format and its working and displaying selected date in the box as expected.
Now, I need to get individual values from whats being displayed/selected, i.e., month, date, year. I need them to be used to query something in database.
Example : Displayed as July 14th, 2010. I require after displaying it in box, the numeric values as 7(for month), 14(for date), 2010(for the year).
Plese help, I'll be really thankful.
_ Chirayu Diwan
DateBox has a method getValue() which returns an obect of type java.util.Date. This class has individual method to get getYear(), getMonth() (offsets with 0, so 0 is January) and getDay().

Classic Asp Date

Hey, been looking for a while but I can't seem to find any info on how to handle date in classic asp.
For now, I need a way to calculate the number of days passed in the current year. I was thinking about a simple function that would take the current date, then make another date with (day = 1, month = 1, year(now)). And finally get the datediff(day) for these two. Easy enough, but I can't figure out how to do this. Help is appreciated!
Perhaps this example can help you? https://web.archive.org/web/20211020135923/https://www.4guysfromrolla.com/webtech/110398-1.shtml
DateDiff("d",DateSerial(Year(Now),1,1),Date)