Passing date into NSURL - nsdate

I m trying to pass date into NSURL but I cant success. if anybody know about that then please tell me...
suppose i have date like January 1, 2000
I m trying to pass it through NSURL but i cant success.
please help me
Thanks....

Use NSDateFormatter and convert your date to yyyy_MM_DD format

Related

How to Properly read an excel with date format problems in R

I Have an excel file with blood sample results (i.e. Insuline and Glycemia).
The problem is that there are some cells on that excel file that have a wrong format, they have the insulin results as a personalized date format (d.m), therefore the result looks like 18.3 (which is reasonable) but when I try to read the file in R, it looks like a numeric date = 44273 (March 18th, 2021).
I've been trying to fix it at the excel file, but I haven't been able to do it. Does anybody has an idea of how to fix this problem?
Best Regards!
you could use package readxl and use the col_types argument to read in the column as numeric. Below would be reading 4th column as numeric:
library(readxl)
read_excel("blood_sample.xlsx", col_types = c("logical", "skip", "guess", "numeric"))
Read more here: https://readxl.tidyverse.org/articles/cell-and-column-types.html

Python convert date string from an UNKNOWN format

Noob here - sorry in advance. I have a large data set with dates in a variety of unknown formats. I need to convert those unknown date formats into a consistent format such as "M/D/YYYY".
All the samples I see require that you know the input format, which I do not. I found references to "dateutil" which may work, but I cannot find out how to add that to my WINDOWS environment. All I've seen is "use PIP" which is Greek to me and WINDOWS apparently.
Is there a function (DEF) out there that takes a date string in an unknown format and converts it to a date object that can be re-formatted consistently?
OR -
If dateutil will help me solve my problem is there a WINDOWS version and how do I install it and then reference it?
Please do not refer me to the following, it does not answer my question: Converting date string in unknown format to datetime
THANKS IN ADVANCE!

New Date().toISOString() issues

This is a strange issue. In my mongodb, I have ISODate something like this:
ISODate("1937-08-03T00:00:00.000Z")
in my find, I am doing
var isoString = new Date(inputDate).toISOString();
db.collection.find({dob: new Date(isoString)})
'inputDate' cab be yyyy-MM-dd or MM/dd/yyyy
when I convert string that is user inputted '1937-08-03' using Date().toISOString(), so I get
1937-08-03T00:00:00.000Z
but when my date format changes to 08/03/1937, using Date().toISOString(), I see ISO string as
1937-08-03T04:00:00.000Z
if you notice, I see 4 hours added when my date format changed to MM/dd/yyyy from yyyy-MM-dd. so obviously with extra 4 hours added, I am not able to pull the record from the db (no match)
How do I work this?
I am using Node and mongo. Thanks for any help.
OK here is how I handled the work around. I know my input date formats are either MM/dd/yyyy or MM-dd-yyyy so I split the string based on / OR - using the regex, and then reformatted back to yyyy-mm-dd format which works fine. If anyone has better solution, please post it here.
var dtArray = inputDate.split(/-|\//);
var dtStr = dtArray[2]+'-'+dtArray[0]+'-'+dtArray[1];

Conversion of between type of timestamp in Microsoft Excel

I have a UNIX time stamp of "YYYY-MM-DD:24HH:MM:SS", i want to convert this to the Microsoft timestamp of "MM/DD/YY 24HH:MM".
Can someone please help me with this?
Source timestamp Example: "**2013-07-24:13.51.47**"
Excel timestamp example: "**07/24/13 13:51**"
Solution that is really simple and stupid:
=MID(A1,6,2)&"/"&MID(A1,9,2)&"/"&MID(A1,3,2)&" "&MID(A1,12,2)&":"&MID(A1,15,2)
assuming A1 contains the unix time stamp.
Perhaps this would suit:
="**"&TEXT(MID(A1,3,10),"mm/dd/yy")&" "&SUBSTITUTE(MID(A1,14,5),".",":")&"**"
Edit Considering clarification (completely new question?) in comments:
=LEFT(A1,10)+SUBSTITUTE(MID(A1,12,5),".",":")

Convert number to month name?

I have this formula:
DQ11=DATE("20"&LEFT(DN18;2);1;-2)-WEEKDAY(DATE("20"&LEFT(DN18;2);1;3))+RIGHT(DN18;2)*7
which gives the number 41519.
For reference:
DN18 = 1336
Now I want to convert 41519 to a month name. How do I do that? I've tried:
=TEXT(DQ11;"mmm")
but it returns 00.
Apparantly Text(DQ11;"MMM") gives me what I want.
I don't know why mmm didn't work and hope that my code will work on other vesions of Excel.

Resources